diff options
| author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2011-05-25 20:57:22 +0000 |
|---|---|---|
| committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2011-05-25 20:57:22 +0000 |
| commit | 3a8ba90dfb0c2eb224f317dd692ede426691e72a (patch) | |
| tree | fe1cc5379a2e0e031663fe9c15d908653844bc73 /src/wsocket.c | |
| parent | bce60be30fe8e9c1b0eb33128c23c93d7bca5303 (diff) | |
| download | luasocket-3a8ba90dfb0c2eb224f317dd692ede426691e72a.tar.gz luasocket-3a8ba90dfb0c2eb224f317dd692ede426691e72a.tar.bz2 luasocket-3a8ba90dfb0c2eb224f317dd692ede426691e72a.zip | |
Saving before big changes to support IPv6.
Diffstat (limited to 'src/wsocket.c')
| -rw-r--r-- | src/wsocket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wsocket.c b/src/wsocket.c index e247777..2d07904 100644 --- a/src/wsocket.c +++ b/src/wsocket.c | |||
| @@ -54,7 +54,7 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) { | |||
| 54 | if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ | 54 | if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ |
| 55 | if (sw & WAITFD_R) { | 55 | if (sw & WAITFD_R) { |
| 56 | FD_ZERO(&rfds); | 56 | FD_ZERO(&rfds); |
| 57 | FD_SET(*ps, &rfds); | 57 | FD_SET(*ps, &rfds); |
| 58 | rp = &rfds; | 58 | rp = &rfds; |
| 59 | } | 59 | } |
| 60 | if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; } | 60 | if (sw & WAITFD_W) { FD_ZERO(&wfds); FD_SET(*ps, &wfds); wp = &wfds; } |
| @@ -207,7 +207,7 @@ int socket_send(p_socket ps, const char *data, size_t count, | |||
| 207 | /* loop until we send something or we give up on error */ | 207 | /* loop until we send something or we give up on error */ |
| 208 | for ( ;; ) { | 208 | for ( ;; ) { |
| 209 | /* try to send something */ | 209 | /* try to send something */ |
| 210 | int put = send(*ps, data, (int) count, 0); | 210 | int put = send(*ps, data, (int) count, 0); |
| 211 | /* if we sent something, we are done */ | 211 | /* if we sent something, we are done */ |
| 212 | if (put > 0) { | 212 | if (put > 0) { |
| 213 | *sent = put; | 213 | *sent = put; |
| @@ -346,8 +346,8 @@ const char *socket_strerror(int err) { | |||
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | const char *socket_ioerror(p_socket ps, int err) { | 348 | const char *socket_ioerror(p_socket ps, int err) { |
| 349 | (void) ps; | 349 | (void) ps; |
| 350 | return socket_strerror(err); | 350 | return socket_strerror(err); |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | static const char *wstrerror(int err) { | 353 | static const char *wstrerror(int err) { |
