mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-04-23 18:11:00 -07:00
When socket routines fail, extract the error message from the C library.
This commit is contained in:
parent
f7aabfc3ac
commit
6c6ccc604c
1 changed files with 4 additions and 4 deletions
|
|
@ -213,9 +213,9 @@ create_server_port(int port)
|
|||
inaddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
|
||||
if (bind(request, (struct sockaddr *)&inaddr, sizeof (inaddr)))
|
||||
FEerror("Binding TCP socket", 0);
|
||||
FElibc_error("Binding TCP socket", 0);
|
||||
if (listen(request, 1))
|
||||
FEerror("TCP listening", 0);
|
||||
FElibc_error("TCP listening", 0);
|
||||
#ifdef THREADS
|
||||
/* Don't make this file-descriptor non-blocking
|
||||
* just block on it before we attempt to accept from it
|
||||
|
|
@ -238,13 +238,13 @@ create_server_port(int port)
|
|||
goto loop;
|
||||
} else {
|
||||
fclose(fp);
|
||||
FEerror("Accepting requests", 0);
|
||||
FElibc_error("Accepting requests", 0);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
#else
|
||||
if ((conn = accept(request, (struct sockaddr *)NULL, (int *)NULL)) < 0)
|
||||
FEerror("Accepting requests", 0);
|
||||
FElibc_error("Accepting requests", 0);
|
||||
#endif /* THREADS */
|
||||
|
||||
return(conn);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue