gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r31637 - in gnunet/src: conversation include


From: gnunet
Subject: [GNUnet-SVN] r31637 - in gnunet/src: conversation include
Date: Fri, 20 Dec 2013 22:36:24 +0100

Author: grothoff
Date: 2013-12-20 22:36:24 +0100 (Fri, 20 Dec 2013)
New Revision: 31637

Modified:
   gnunet/src/conversation/conversation_api_call.c
   gnunet/src/conversation/gnunet-conversation.c
   gnunet/src/include/gnunet_conversation_service.h
Log:
-this should fix #3228 (communicate conversation/reconnect errors to client)

Modified: gnunet/src/conversation/conversation_api_call.c
===================================================================
--- gnunet/src/conversation/conversation_api_call.c     2013-12-20 21:14:32 UTC 
(rev 31636)
+++ gnunet/src/conversation/conversation_api_call.c     2013-12-20 21:36:24 UTC 
(rev 31637)
@@ -416,6 +416,8 @@
   struct GNUNET_MQ_Envelope *e;
   struct ClientCallMessage *ccm;
 
+  GNUNET_break (NULL != call->gns_lookup);
+  GNUNET_break (CS_LOOKUP == call->gns_lookup);
   call->gns_lookup = NULL;
   for (i=0;i<rd_count;i++)
   {
@@ -516,8 +518,10 @@
   }
   call->state = CS_SHUTDOWN;
   call->client = GNUNET_CLIENT_connect ("conversation", call->cfg);
-  if (NULL == call->client)
+  if (NULL == call->client);
     return;
+  call->event_handler (call->event_handler_cls,
+                       GNUNET_CONVERSATION_EC_CALL_ERROR);
   call->mq = GNUNET_MQ_queue_for_connection_client (call->client,
                                                     handlers,
                                                     &call_error_handler,

Modified: gnunet/src/conversation/gnunet-conversation.c
===================================================================
--- gnunet/src/conversation/gnunet-conversation.c       2013-12-20 21:14:32 UTC 
(rev 31636)
+++ gnunet/src/conversation/gnunet-conversation.c       2013-12-20 21:36:24 UTC 
(rev 31637)
@@ -411,6 +411,11 @@
              _("Connection to `%s' resumed (by other user)\n"),
              peer_name);
     break;
+  case GNUNET_CONVERSATION_EC_CALL_ERROR:
+    FPRINTF (stdout,
+             _("Error with the call, restarting it\n"));
+    call_state = CS_RESOLVING;
+    break;
   }
 }
 

Modified: gnunet/src/include/gnunet_conversation_service.h
===================================================================
--- gnunet/src/include/gnunet_conversation_service.h    2013-12-20 21:14:32 UTC 
(rev 31636)
+++ gnunet/src/include/gnunet_conversation_service.h    2013-12-20 21:36:24 UTC 
(rev 31637)
@@ -333,8 +333,15 @@
    * both sides can independently suspend and resume calls; a call is
    * only "working" of both sides are active.
    */
-  GNUNET_CONVERSATION_EC_CALL_RESUMED
+  GNUNET_CONVERSATION_EC_CALL_RESUMED,
 
+  /**
+   * We had an error handing the call, and are now restarting it
+   * (back to lookup).  This happens, for example, if the peer
+   * is restarted during a call.
+   */
+  GNUNET_CONVERSATION_EC_CALL_ERROR
+
 };
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]