aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-service-conversation.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-12-16 16:11:30 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-12-16 16:11:30 +0000
commit11f1a50939e73ce6fd193518f17bbc99ee430264 (patch)
tree90309f0bfee8c087abb693ca981d832d7ea64835 /src/conversation/gnunet-service-conversation.c
parentb0709d5dc0e61ac0189c4f8704410532bb33907e (diff)
downloadgnunet-11f1a50939e73ce6fd193518f17bbc99ee430264.tar.gz
gnunet-11f1a50939e73ce6fd193518f17bbc99ee430264.zip
- call GNUNET_SERVER_receive_done() when returning from message handlers
Diffstat (limited to 'src/conversation/gnunet-service-conversation.c')
-rw-r--r--src/conversation/gnunet-service-conversation.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c
index f44f6f128..c50c688c2 100644
--- a/src/conversation/gnunet-service-conversation.c
+++ b/src/conversation/gnunet-service-conversation.c
@@ -325,6 +325,7 @@ handle_client_pickup_message (void *cls,
325 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 325 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
326 "Channel %u not found\n", 326 "Channel %u not found\n",
327 msg->cid); 327 msg->cid);
328 GNUNET_SERVER_receive_done (client, GNUNET_YES);
328 return; 329 return;
329 } 330 }
330 switch (ch->status) 331 switch (ch->status)
@@ -339,7 +340,6 @@ handle_client_pickup_message (void *cls,
339 case CS_CALLEE_SHUTDOWN: 340 case CS_CALLEE_SHUTDOWN:
340 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 341 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
341 "Ignoring client's PICKUP message, line is in SHUTDOWN\n"); 342 "Ignoring client's PICKUP message, line is in SHUTDOWN\n");
342 GNUNET_SERVER_receive_done (client, GNUNET_OK);
343 break; 343 break;
344 case CS_CALLER_CALLING: 344 case CS_CALLER_CALLING:
345 case CS_CALLER_CONNECTED: 345 case CS_CALLER_CONNECTED:
@@ -483,6 +483,7 @@ handle_client_hangup_message (void *cls,
483 break; 483 break;
484 case CS_CALLEE_SHUTDOWN: 484 case CS_CALLEE_SHUTDOWN:
485 /* maybe the other peer closed asynchronously... */ 485 /* maybe the other peer closed asynchronously... */
486 GNUNET_SERVER_receive_done (client, GNUNET_OK);
486 return; 487 return;
487 case CS_CALLER_CALLING: 488 case CS_CALLER_CALLING:
488 ch->status = CS_CALLER_SHUTDOWN; 489 ch->status = CS_CALLER_SHUTDOWN;
@@ -492,6 +493,7 @@ handle_client_hangup_message (void *cls,
492 break; 493 break;
493 case CS_CALLER_SHUTDOWN: 494 case CS_CALLER_SHUTDOWN:
494 /* maybe the other peer closed asynchronously... */ 495 /* maybe the other peer closed asynchronously... */
496 GNUNET_SERVER_receive_done (client, GNUNET_OK);
495 return; 497 return;
496 } 498 }
497 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 499 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -541,6 +543,7 @@ handle_client_suspend_message (void *cls,
541 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 543 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
542 "Channel %u not found\n", 544 "Channel %u not found\n",
543 msg->cid); 545 msg->cid);
546 GNUNET_SERVER_receive_done (client, GNUNET_OK);
544 return; 547 return;
545 } 548 }
546 if (GNUNET_YES == ch->suspended_local) 549 if (GNUNET_YES == ch->suspended_local)
@@ -560,6 +563,7 @@ handle_client_suspend_message (void *cls,
560 break; 563 break;
561 case CS_CALLEE_SHUTDOWN: 564 case CS_CALLEE_SHUTDOWN:
562 /* maybe the other peer closed asynchronously... */ 565 /* maybe the other peer closed asynchronously... */
566 GNUNET_SERVER_receive_done (client, GNUNET_OK);
563 return; 567 return;
564 case CS_CALLER_CALLING: 568 case CS_CALLER_CALLING:
565 GNUNET_break (0); 569 GNUNET_break (0);
@@ -570,6 +574,7 @@ handle_client_suspend_message (void *cls,
570 break; 574 break;
571 case CS_CALLER_SHUTDOWN: 575 case CS_CALLER_SHUTDOWN:
572 /* maybe the other peer closed asynchronously... */ 576 /* maybe the other peer closed asynchronously... */
577 GNUNET_SERVER_receive_done (client, GNUNET_OK);
573 return; 578 return;
574 } 579 }
575 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 580 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -616,6 +621,7 @@ handle_client_resume_message (void *cls,
616 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 621 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
617 "Channel %u not found\n", 622 "Channel %u not found\n",
618 msg->cid); 623 msg->cid);
624 GNUNET_SERVER_receive_done (client, GNUNET_OK);
619 return; 625 return;
620 } 626 }
621 if (GNUNET_YES != ch->suspended_local) 627 if (GNUNET_YES != ch->suspended_local)
@@ -635,6 +641,7 @@ handle_client_resume_message (void *cls,
635 break; 641 break;
636 case CS_CALLEE_SHUTDOWN: 642 case CS_CALLEE_SHUTDOWN:
637 /* maybe the other peer closed asynchronously... */ 643 /* maybe the other peer closed asynchronously... */
644 GNUNET_SERVER_receive_done (client, GNUNET_OK);
638 return; 645 return;
639 case CS_CALLER_CALLING: 646 case CS_CALLER_CALLING:
640 GNUNET_break (0); 647 GNUNET_break (0);
@@ -645,6 +652,7 @@ handle_client_resume_message (void *cls,
645 break; 652 break;
646 case CS_CALLER_SHUTDOWN: 653 case CS_CALLER_SHUTDOWN:
647 /* maybe the other peer closed asynchronously... */ 654 /* maybe the other peer closed asynchronously... */
655 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
648 return; 656 return;
649 } 657 }
650 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 658 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -799,6 +807,7 @@ handle_client_audio_message (void *cls,
799 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 807 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
800 "Channel %u not found\n", 808 "Channel %u not found\n",
801 msg->cid); 809 msg->cid);
810 GNUNET_SERVER_receive_done (client, GNUNET_OK);
802 return; 811 return;
803 } 812 }
804 813