aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-service-conversation.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-12-20 14:37:09 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-12-20 14:37:09 +0000
commitc8b0a68ec9cbe6bc4f525b1e8c24bb1c0bb3485d (patch)
tree3680874b895cf5ba37399d93218dcf69421871f0 /src/conversation/gnunet-service-conversation.c
parent36eca5bf2cdc547f3a86dd2916c1559281952d17 (diff)
downloadgnunet-c8b0a68ec9cbe6bc4f525b1e8c24bb1c0bb3485d.tar.gz
gnunet-c8b0a68ec9cbe6bc4f525b1e8c24bb1c0bb3485d.zip
- call MESH_channel_done() after successfully handling messages
Diffstat (limited to 'src/conversation/gnunet-service-conversation.c')
-rw-r--r--src/conversation/gnunet-service-conversation.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c
index c50c688c2..58d1254cc 100644
--- a/src/conversation/gnunet-service-conversation.c
+++ b/src/conversation/gnunet-service-conversation.c
@@ -922,6 +922,7 @@ handle_mesh_ring_message (void *cls,
922 GNUNET_break_op (0); 922 GNUNET_break_op (0);
923 return GNUNET_SYSERR; 923 return GNUNET_SYSERR;
924 } 924 }
925 GNUNET_MESH_receive_done (channel); /* needed? */
925 for (line = lines_head; NULL != line; line = line->next) 926 for (line = lines_head; NULL != line; line = line->next)
926 if (line->local_line == ntohl (msg->remote_line)) 927 if (line->local_line == ntohl (msg->remote_line))
927 break; 928 break;
@@ -938,7 +939,6 @@ handle_mesh_ring_message (void *cls,
938 reliable_mq = GNUNET_MESH_mq_create (channel); 939 reliable_mq = GNUNET_MESH_mq_create (channel);
939 GNUNET_MQ_send (reliable_mq, e); 940 GNUNET_MQ_send (reliable_mq, e);
940 /* FIXME: do we need to clean up reliable_mq somehow/somewhere? */ 941 /* FIXME: do we need to clean up reliable_mq somehow/somewhere? */
941 GNUNET_MESH_receive_done (channel); /* needed? */
942 return GNUNET_OK; 942 return GNUNET_OK;
943 } 943 }
944 ch = GNUNET_new (struct Channel); 944 ch = GNUNET_new (struct Channel);
@@ -964,7 +964,6 @@ handle_mesh_ring_message (void *cls,
964 line->client, 964 line->client,
965 &cring.header, 965 &cring.header,
966 GNUNET_NO); 966 GNUNET_NO);
967 GNUNET_MESH_receive_done (channel);
968 return GNUNET_OK; 967 return GNUNET_OK;
969} 968}
970 969
@@ -1257,7 +1256,7 @@ handle_mesh_audio_message (void *cls,
1257 if (NULL == info) 1256 if (NULL == info)
1258 { 1257 {
1259 GNUNET_break (0); 1258 GNUNET_break (0);
1260 return GNUNET_OK; 1259 return GNUNET_SYSERR;
1261 } 1260 }
1262 sender = info->peer; 1261 sender = info->peer;
1263 for (line = lines_head; NULL != line; line = line->next) 1262 for (line = lines_head; NULL != line; line = line->next)
@@ -1294,12 +1293,13 @@ handle_mesh_audio_message (void *cls,
1294 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1293 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1295 "Received %u bytes of AUDIO data on suspended channel CID %u:(%u:%u); dropping\n", 1294 "Received %u bytes of AUDIO data on suspended channel CID %u:(%u:%u); dropping\n",
1296 msize, ch->cid, ch->remote_line, line->local_line); 1295 msize, ch->cid, ch->remote_line, line->local_line);
1296 GNUNET_MESH_receive_done (channel);
1297 return GNUNET_OK; 1297 return GNUNET_OK;
1298 } 1298 }
1299 ch->channel_unreliable = channel; 1299 ch->channel_unreliable = channel;
1300 *channel_ctx = ch; 1300 *channel_ctx = ch;
1301 } 1301 }
1302 GNUNET_break (ch->line->local_line == ntohl (msg->remote_line)); 1302 GNUNET_MESH_receive_done (channel);
1303 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1303 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1304 "Forwarding %u bytes of AUDIO data to client CID %u:(%u:%u)\n", 1304 "Forwarding %u bytes of AUDIO data to client CID %u:(%u:%u)\n",
1305 msize, ch->cid, ch->remote_line, ch->line->local_line); 1305 msize, ch->cid, ch->remote_line, ch->line->local_line);
@@ -1312,7 +1312,6 @@ handle_mesh_audio_message (void *cls,
1312 ch->line->client, 1312 ch->line->client,
1313 &cam->header, 1313 &cam->header,
1314 GNUNET_YES); 1314 GNUNET_YES);
1315 GNUNET_MESH_receive_done (channel);
1316 return GNUNET_OK; 1315 return GNUNET_OK;
1317} 1316}
1318 1317