diff options
author | Jakub Sławiński | 2006-02-05 15:14:03 +0100 |
---|---|---|
committer | Joshua Judson Rosen | 2014-07-17 21:15:02 +0200 |
commit | b457fec36399c1f7de093d5e92bb4fa453b79c86 (patch) | |
tree | 2084c9a78d40213015e6f10e3e9e01bc4c0c51f1 /src/server_get.c | |
parent | Update copyright statements. (diff) | |
download | apf-b457fec36399c1f7de093d5e92bb4fa453b79c86.tar.gz |
v0.8
- Fixed: infinite loop after buffering message
- Fixed: corrupt packets after closing connections in the stopped state
- Fixed: bug in mapping user numbers between afclient and afserver
- Fixed: premature close of the service connection
- Fixed: invalid buffering when the connection is closing
- Added: Multiple tunnels in one afclient<->afserver connection
Diffstat (limited to 'src/server_get.c')
-rw-r--r-- | src/server_get.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server_get.c b/src/server_get.c index e8b052b..b09cab0 100644 --- a/src/server_get.c +++ b/src/server_get.c @@ -23,12 +23,29 @@ #include "server_get.h" #include <stdlib.h> #include <errno.h> +#include <assert.h> + +/* + * Function name: get_new_socket + * Description: Returns new accepted socket. + * Arguments: sockfd - the file descriptor of the listening socket + * type - the type of the listening socket + * addr - pointer to sockaddr structure + * addrlen - pointer to the length of the sockaddr structure + * tunneltype - the type of the connection + * Returns: The new accepted socket. + */ int get_new_socket(int sockfd, char type, struct sockaddr *addr, socklen_t *addrlen, char* tunneltype) { int tmp; int n, i; + + assert(addr != NULL); + assert(addrlen != NULL); + assert(tunneltype != NULL); + switch (type) { case 0: { return accept(sockfd, addr, addrlen); |