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/inet.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/inet.c')
| -rw-r--r-- | src/inet.c | 3 |
1 files changed, 1 insertions, 2 deletions
| @@ -213,7 +213,7 @@ const char *inet_tryconnect(p_socket ps, const char *address, | |||
| 213 | memset(&remote, 0, sizeof(remote)); | 213 | memset(&remote, 0, sizeof(remote)); |
| 214 | remote.sin_family = AF_INET; | 214 | remote.sin_family = AF_INET; |
| 215 | remote.sin_port = htons(port); | 215 | remote.sin_port = htons(port); |
| 216 | if (strcmp(address, "*")) { | 216 | if (strcmp(address, "*")) { |
| 217 | if (!inet_aton(address, &remote.sin_addr)) { | 217 | if (!inet_aton(address, &remote.sin_addr)) { |
| 218 | struct hostent *hp = NULL; | 218 | struct hostent *hp = NULL; |
| 219 | struct in_addr **addr; | 219 | struct in_addr **addr; |
| @@ -248,7 +248,6 @@ const char *inet_trybind(p_socket ps, const char *address, unsigned short port) | |||
| 248 | memcpy(&local.sin_addr, *addr, sizeof(struct in_addr)); | 248 | memcpy(&local.sin_addr, *addr, sizeof(struct in_addr)); |
| 249 | } | 249 | } |
| 250 | err = socket_bind(ps, (SA *) &local, sizeof(local)); | 250 | err = socket_bind(ps, (SA *) &local, sizeof(local)); |
| 251 | if (err != IO_DONE) socket_destroy(ps); | ||
| 252 | return socket_strerror(err); | 251 | return socket_strerror(err); |
| 253 | } | 252 | } |
| 254 | 253 | ||
