gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r33526 - gnunet/src/revocation


From: gnunet
Subject: [GNUnet-SVN] r33526 - gnunet/src/revocation
Date: Wed, 4 Jun 2014 19:47:50 +0200

Author: grothoff
Date: 2014-06-04 19:47:50 +0200 (Wed, 04 Jun 2014)
New Revision: 33526

Modified:
   gnunet/src/revocation/gnunet-service-revocation.c
   gnunet/src/revocation/test_revocation.c
Log:
-fix #3428

Modified: gnunet/src/revocation/gnunet-service-revocation.c
===================================================================
--- gnunet/src/revocation/gnunet-service-revocation.c   2014-06-04 17:31:39 UTC 
(rev 33525)
+++ gnunet/src/revocation/gnunet-service-revocation.c   2014-06-04 17:47:50 UTC 
(rev 33526)
@@ -707,6 +707,9 @@
     GNUNET_break (0);
     return;
   }
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Received set exchange request from peer `%s'\n",
+              GNUNET_i2s (other_peer));
   peer_entry = GNUNET_CONTAINER_multipeermap_get (peers,
                                                   other_peer);
   if (NULL == peer_entry)
@@ -722,6 +725,15 @@
                                       GNUNET_SET_RESULT_ADDED,
                                       &add_revocation,
                                       peer_entry);
+  if (GNUNET_OK !=
+      GNUNET_SET_commit (peer_entry->so,
+                         revocation_set))
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                _("SET service crashed, terminating revocation service\n"));
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
 }
 
 

Modified: gnunet/src/revocation/test_revocation.c
===================================================================
--- gnunet/src/revocation/test_revocation.c     2014-06-04 17:31:39 UTC (rev 
33525)
+++ gnunet/src/revocation/test_revocation.c     2014-06-04 17:47:50 UTC (rev 
33526)
@@ -103,7 +103,8 @@
 
 
 static void
-do_shutdown_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+do_shutdown_badly (void *cls,
+                   const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (GNUNET_SCHEDULER_NO_TASK != die_task)
     die_task = GNUNET_SCHEDULER_NO_TASK;
@@ -114,16 +115,18 @@
 
 static void *
 identity_connect_adapter (void *cls,
-    const struct GNUNET_CONFIGURATION_Handle *cfg)
+                          const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   struct TestPeer *me = cls;
   me->cfg = cfg;
   me->idh = GNUNET_IDENTITY_connect (cfg, NULL, NULL );
   if (NULL == me->idh)
-    GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to create IDENTITY handle \n");
+    GNUNET_log(GNUNET_ERROR_TYPE_ERROR,
+               "Failed to create IDENTITY handle \n");
   return me->idh;
 }
 
+
 static void
 identity_disconnect_adapter (void *cls, void *op_result)
 {
@@ -134,11 +137,13 @@
 
 
 static void
-check_revocation ();
+check_revocation (void *cls,
+                  const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
-revocation_remote_cb (void *cls, int is_valid)
+revocation_remote_cb (void *cls,
+                      int is_valid)
 {
   static int repeat = 0;
   if (GNUNET_NO == is_valid)
@@ -169,7 +174,8 @@
 
 
 static void
-check_revocation ()
+check_revocation (void *cls,
+                  const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   GNUNET_REVOCATION_query (testpeers[0].cfg,
                            &testpeers[1].pubkey,
@@ -178,14 +184,15 @@
 
 
 static void
-revocation_cb (void *cls, int is_valid)
+revocation_cb (void *cls,
+               int is_valid)
 {
   testpeers[1].revok_handle = NULL;
   if (GNUNET_NO == is_valid)
   {
     GNUNET_log(GNUNET_ERROR_TYPE_INFO,
                "Revocation successful\n");
-    check_revocation ();
+    check_revocation (NULL, NULL);
   }
 }
 




reply via email to

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