diff options
Diffstat (limited to 'src/social/gnunet-service-social.c')
-rw-r--r-- | src/social/gnunet-service-social.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index 4541a4e06..f9e70a25d 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -1935,7 +1935,7 @@ client_guest_enter (struct Client *c, | |||
1935 | struct ClientListItem *cli = GNUNET_new (struct ClientListItem); | 1935 | struct ClientListItem *cli = GNUNET_new (struct ClientListItem); |
1936 | cli->client = client; | 1936 | cli->client = client; |
1937 | GNUNET_CONTAINER_DLL_insert (plc->clients_head, plc->clients_tail, cli); | 1937 | GNUNET_CONTAINER_DLL_insert (plc->clients_head, plc->clients_tail, cli); |
1938 | return GNUNET_OK; | 1938 | return GNUNET_OK; |
1939 | } | 1939 | } |
1940 | 1940 | ||
1941 | 1941 | ||
@@ -2224,7 +2224,7 @@ handle_client_place_leave (void *cls, | |||
2224 | struct Client *c = cls; | 2224 | struct Client *c = cls; |
2225 | struct GNUNET_SERVICE_Client *client = c->client; | 2225 | struct GNUNET_SERVICE_Client *client = c->client; |
2226 | struct Place *plc = c->place; | 2226 | struct Place *plc = c->place; |
2227 | 2227 | ||
2228 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 2228 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
2229 | "handle_client_place_leave\n"); | 2229 | "handle_client_place_leave\n"); |
2230 | 2230 | ||
@@ -2251,6 +2251,7 @@ handle_client_place_leave (void *cls, | |||
2251 | while (NULL != cli) | 2251 | while (NULL != cli) |
2252 | { | 2252 | { |
2253 | GNUNET_CONTAINER_DLL_remove (plc->clients_head, plc->clients_tail, cli); | 2253 | GNUNET_CONTAINER_DLL_remove (plc->clients_head, plc->clients_tail, cli); |
2254 | // protocol design failure: should *tell* clients that room is gone! | ||
2254 | GNUNET_SERVICE_client_drop (cli->client); | 2255 | GNUNET_SERVICE_client_drop (cli->client); |
2255 | next = cli->next; | 2256 | next = cli->next; |
2256 | GNUNET_free (cli); | 2257 | GNUNET_free (cli); |
@@ -2269,8 +2270,8 @@ handle_client_place_leave (void *cls, | |||
2269 | cleanup_place (plc); | 2270 | cleanup_place (plc); |
2270 | } | 2271 | } |
2271 | } | 2272 | } |
2272 | //GNUNET_SERVICE_client_continue (client); | 2273 | // FIXME: can't continue+drop above, but should not drop above! |
2273 | //GNUNET_SERVICE_client_drop (client); | 2274 | // GNUNET_SERVICE_client_continue (client); |
2274 | } | 2275 | } |
2275 | 2276 | ||
2276 | 2277 | ||
@@ -2958,15 +2959,14 @@ handle_client_psyc_message (void *cls, | |||
2958 | struct Client *c = cls; | 2959 | struct Client *c = cls; |
2959 | struct GNUNET_SERVICE_Client *client = c->client; | 2960 | struct GNUNET_SERVICE_Client *client = c->client; |
2960 | struct Place *plc = c->place; | 2961 | struct Place *plc = c->place; |
2962 | int ret; | ||
2963 | |||
2961 | if (NULL == plc) | 2964 | if (NULL == plc) |
2962 | { | 2965 | { |
2963 | GNUNET_break (0); | 2966 | GNUNET_break (0); |
2964 | GNUNET_SERVICE_client_drop (client); | 2967 | GNUNET_SERVICE_client_drop (client); |
2965 | return; | 2968 | return; |
2966 | } | 2969 | } |
2967 | |||
2968 | int ret = GNUNET_SYSERR; | ||
2969 | |||
2970 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 2970 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
2971 | "%p Received message from client.\n", plc); | 2971 | "%p Received message from client.\n", plc); |
2972 | GNUNET_PSYC_log_message (GNUNET_ERROR_TYPE_DEBUG, msg); | 2972 | GNUNET_PSYC_log_message (GNUNET_ERROR_TYPE_DEBUG, msg); |
@@ -2994,10 +2994,11 @@ handle_client_psyc_message (void *cls, | |||
2994 | return; | 2994 | return; |
2995 | } | 2995 | } |
2996 | 2996 | ||
2997 | uint16_t first_ptype = 0, last_ptype = 0; | 2997 | uint16_t first_ptype = 0; |
2998 | if (GNUNET_SYSERR | 2998 | uint16_t last_ptype = 0; |
2999 | == GNUNET_PSYC_receive_check_parts (psize, (const char *) &msg[1], | 2999 | if (GNUNET_SYSERR == |
3000 | &first_ptype, &last_ptype)) | 3000 | GNUNET_PSYC_receive_check_parts (psize, (const char *) &msg[1], |
3001 | &first_ptype, &last_ptype)) | ||
3001 | { | 3002 | { |
3002 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 3003 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
3003 | "%p Received invalid message part from client.\n", plc); | 3004 | "%p Received invalid message part from client.\n", plc); |
@@ -3019,7 +3020,10 @@ handle_client_psyc_message (void *cls, | |||
3019 | c->tmit_msg = NULL; | 3020 | c->tmit_msg = NULL; |
3020 | ret = psyc_transmit_message (plc); | 3021 | ret = psyc_transmit_message (plc); |
3021 | } | 3022 | } |
3022 | 3023 | else | |
3024 | { | ||
3025 | ret = GNUNET_SYSERR; | ||
3026 | } | ||
3023 | if (GNUNET_OK != ret) | 3027 | if (GNUNET_OK != ret) |
3024 | { | 3028 | { |
3025 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 3029 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -3440,7 +3444,7 @@ path_basename (const char *path) | |||
3440 | if (NULL != basename) | 3444 | if (NULL != basename) |
3441 | basename++; | 3445 | basename++; |
3442 | 3446 | ||
3443 | if (NULL == basename || '\0' == basename) | 3447 | if (NULL == basename || '\0' == *basename) |
3444 | return NULL; | 3448 | return NULL; |
3445 | 3449 | ||
3446 | return basename; | 3450 | return basename; |