Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
93
Issues
93
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
06fb100e
Commit
06fb100e
authored
Mar 22, 2002
by
Jack Moffitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error == 0 to recoverable error numbers. Patch from Ricardo Galli.
Minor style fixes. svn path=/trunk/net/; revision=3174
parent
39635122
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/net/sock.c
src/net/sock.c
+6
-5
No files found.
src/net/sock.c
View file @
06fb100e
...
...
@@ -118,7 +118,7 @@ int sock_error(void)
*/
int
sock_recoverable
(
int
error
)
{
return
(
error
==
EAGAIN
||
error
==
EINTR
||
error
==
EINPROGRESS
||
error
==
EWOULDBLOCK
);
return
(
error
==
0
||
error
==
EAGAIN
||
error
==
EINTR
||
error
==
EINPROGRESS
||
error
==
EWOULDBLOCK
);
}
/* sock_valid_socket
...
...
@@ -433,7 +433,7 @@ sock_t sock_get_server_socket(const int port, char *sinterface)
/* defaults */
memset
(
&
sa
,
0
,
sizeof
(
sa
));
sa_family
=
AF_INET
;
sa_len
=
sizeof
(
struct
sockaddr_in
);
sa_len
=
sizeof
(
struct
sockaddr_in
);
/* set the interface to bind to if specified */
if
(
sinterface
!=
NULL
)
{
...
...
@@ -449,12 +449,13 @@ sock_t sock_get_server_socket(const int port, char *sinterface)
sa_len
=
sizeof
(
struct
sockaddr_in6
);
((
struct
sockaddr_in6
*
)
&
sa
)
->
sin6_family
=
AF_INET6
;
((
struct
sockaddr_in6
*
)
&
sa
)
->
sin6_port
=
htons
(
port
);
}
else
}
else
{
return
SOCK_ERROR
;
}
#else
if
(
!
inet_aton
(
ip
,
&
sa
.
sin_addr
))
if
(
!
inet_aton
(
ip
,
&
sa
.
sin_addr
))
{
return
SOCK_ERROR
;
else
{
}
else
{
sa
.
sin_family
=
AF_INET
;
sa
.
sin_port
=
htons
(
port
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment