gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r28082 - gnunet/src/identity


From: gnunet
Subject: [GNUnet-SVN] r28082 - gnunet/src/identity
Date: Tue, 16 Jul 2013 10:46:15 +0200

Author: grothoff
Date: 2013-07-16 10:46:14 +0200 (Tue, 16 Jul 2013)
New Revision: 28082

Modified:
   gnunet/src/identity/gnunet-service-identity.c
   gnunet/src/identity/identity_api.c
Log:
-proper support for initial listing vs. monitor mode

Modified: gnunet/src/identity/gnunet-service-identity.c
===================================================================
--- gnunet/src/identity/gnunet-service-identity.c       2013-07-16 08:42:23 UTC 
(rev 28081)
+++ gnunet/src/identity/gnunet-service-identity.c       2013-07-16 08:46:14 UTC 
(rev 28082)
@@ -25,10 +25,6 @@
  *
  * The purpose of this service is to manage private keys that
  * represent the various egos/pseudonyms/identities of a GNUnet user.
- *
- * FIXME:
- * - hint for 'end of initial list' is not implemented
- *   (might ALSO be missing in client library!)
  */
 #include "platform.h"
 #include "gnunet_util_lib.h"
@@ -274,6 +270,7 @@
                       const struct GNUNET_MessageHeader *message)
 {
   struct GNUNET_IDENTITY_UpdateMessage *um;
+  struct GNUNET_IDENTITY_UpdateMessage ume;
   struct Ego *ego;
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 
@@ -285,6 +282,11 @@
     GNUNET_SERVER_notification_context_unicast (nc, client, &um->header, 
GNUNET_YES);
     GNUNET_free (um);
   }
+  ume.header.type = htons (GNUNET_MESSAGE_TYPE_IDENTITY_UPDATE);
+  ume.header.size = htons (sizeof (struct GNUNET_IDENTITY_UpdateMessage));
+  ume.pk_len = htons (0);
+  ume.name_len = htons (0);
+  GNUNET_SERVER_notification_context_unicast (nc, client, &ume.header, 
GNUNET_YES);  
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
 }
 

Modified: gnunet/src/identity/identity_api.c
===================================================================
--- gnunet/src/identity/identity_api.c  2013-07-16 08:42:23 UTC (rev 28081)
+++ gnunet/src/identity/identity_api.c  2013-07-16 08:46:14 UTC (rev 28082)
@@ -299,6 +299,14 @@
       reschedule_connect (h);
       return;
     }
+    if ( (0 == pk_len) &&
+        (0 == name_len) )
+    {
+      /* end of initial list of data */
+      if (NULL != h->cb)
+       h->cb (h->cb_cls, NULL, NULL, NULL);
+      return;
+    }
     priv = GNUNET_CRYPTO_ecc_decode_key (str, pk_len, GNUNET_YES); 
     if (NULL == priv)
     {




reply via email to

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