summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Sławiński2006-11-22 14:17:55 +0100
committerJoshua Judson Rosen2014-07-17 21:15:03 +0200
commit0136c76f966b0d74ff0666abb5dd7a1a2516f931 (patch)
tree7c04e4f13caa74a5a66feae440a34a5fa49722f1 /src
parentv0.8.2 (diff)
downloadapf-0136c76f966b0d74ff0666abb5dd7a1a2516f931.tar.gz
v0.8.3
- Fixed: bug in udp_listen function when AF_INET6 is not defined
Diffstat (limited to 'src')
-rw-r--r--src/activefor.h2
-rw-r--r--src/network.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/activefor.h b/src/activefor.h
index 2e667af..e20dc63 100644
--- a/src/activefor.h
+++ b/src/activefor.h
@@ -53,7 +53,7 @@
#define S_STATE_OPENING_CLOSED 17
#define S_STATE_KICKING 19
-#define AF_VER(info) info" v0.8.2"
+#define AF_VER(info) info" v0.8.3"
#define TYPE_TCP 1
#define TYPE_UDP 3
diff --git a/src/network.c b/src/network.c
index 6a62a59..0980893 100644
--- a/src/network.c
+++ b/src/network.c
@@ -155,9 +155,11 @@ ip_listen(int* sockfd, const char *host, const char *serv, socklen_t *addrlenp,
return 4;
}
- if (listen((*sockfd), 5)){
- return 5;
- }
+ if (type & 0x01) { /* tcp_listen */
+ if (listen((*sockfd), 5)){
+ return 5;
+ }
+ }
if (addrlenp) {
*addrlenp = sizeof(servaddr); /* return size of protocol address */