summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ca88b0a)
raw | patch | inline | side by side (parent: ca88b0a)
author | John Ferlito <johnf@inodes.org> | |
Sat, 13 Sep 2014 01:15:30 +0000 (11:15 +1000) | ||
committer | John Ferlito <johnf@inodes.org> | |
Sun, 14 Sep 2014 06:45:16 +0000 (16:45 +1000) |
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index 0e1ff512dd38e7862e7e3ee16d51c2e2f5366a88..9ad4dead906d8619e3d6df8766dd0e4231e95e3d 100644 (file)
--- a/src/network.c
+++ b/src/network.c
return (0);
} /* }}} int sockent_init_crypto */
+static int sockent_client_disconnect (sockent_t *se) /* {{{ */
+{
+ struct sockent_client *client;
+
+ if ((se == NULL) || (se->type != SOCKENT_TYPE_CLIENT))
+ return (EINVAL);
+
+ client = &se->data.client;
+ if (client->fd >= 0) /* connected */
+ {
+ close (client->fd);
+ client->fd = -1;
+ }
+
+ sfree (client->addr);
+ client->addrlen = 0;
+
+ return (0);
+} /* }}} int sockent_client_disconnect */
+
static int sockent_client_connect (sockent_t *se) /* {{{ */
{
static c_complain_t complaint = C_COMPLAIN_INIT_STATIC;
return (0);
} /* }}} int sockent_client_connect */
-static int sockent_client_disconnect (sockent_t *se) /* {{{ */
-{
- struct sockent_client *client;
-
- if ((se == NULL) || (se->type != SOCKENT_TYPE_CLIENT))
- return (EINVAL);
-
- client = &se->data.client;
- if (client->fd >= 0) /* connected */
- {
- close (client->fd);
- client->fd = -1;
- }
-
- sfree (client->addr);
- client->addrlen = 0;
-
- return (0);
-} /* }}} int sockent_client_disconnect */
-
/* Open the file descriptors for a initialized sockent structure. */
static int sockent_server_listen (sockent_t *se) /* {{{ */
{