gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r29698 - gnunet/src/namestore


From: gnunet
Subject: [GNUnet-SVN] r29698 - gnunet/src/namestore
Date: Mon, 30 Sep 2013 10:59:57 +0200

Author: grothoff
Date: 2013-09-30 10:59:57 +0200 (Mon, 30 Sep 2013)
New Revision: 29698

Modified:
   gnunet/src/namestore/gnunet-service-namestore.c
Log:
-fix indentation

Modified: gnunet/src/namestore/gnunet-service-namestore.c
===================================================================
--- gnunet/src/namestore/gnunet-service-namestore.c     2013-09-29 16:38:33 UTC 
(rev 29697)
+++ gnunet/src/namestore/gnunet-service-namestore.c     2013-09-30 08:59:57 UTC 
(rev 29698)
@@ -613,15 +613,16 @@
     GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
     return;
   }
-  struct GNUNET_NAMESTORE_RecordData rd[rd_count];
+  {
+    struct GNUNET_NAMESTORE_RecordData rd[rd_count];
 
-       if (GNUNET_OK !=
-                       GNUNET_NAMESTORE_records_deserialize (rd_ser_len, 
rd_ser, rd_count, rd))
-       {
-               GNUNET_break (0);
-               GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
-               return;
-       }
+    if (GNUNET_OK !=
+       GNUNET_NAMESTORE_records_deserialize (rd_ser_len, rd_ser, rd_count, rd))
+    {
+      GNUNET_break (0);
+      GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+      return;
+    }
 
     /* Extracting and converting private key */
     GNUNET_CRYPTO_ecc_key_get_public_for_signature (&rp_msg->private_key,
@@ -647,46 +648,47 @@
     }
     else
     {
-    res = GSN_database->store_records (GSN_database->cls,
-                                      &rp_msg->private_key,
-                                      conv_name,                               
       
-                                      rd_count, rd);    
-    if (GNUNET_OK == res)
-    {
-      struct ZoneMonitor *zm;
-      struct GNUNET_NAMESTORE_Block *block;
-
-      if (0 == rd_count)
-               block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
-                                              GNUNET_TIME_UNIT_ZERO_ABS,
-                                              conv_name,
-                                              rd, rd_count);
-      else
-               block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
-                                              GNUNET_TIME_UNIT_FOREVER_ABS,
-                                              conv_name,
-                                              rd, rd_count);
-      if (GNUNET_OK !=
-               GSN_database->cache_block (GSN_database->cls,
-                                    block))
+      res = GSN_database->store_records (GSN_database->cls,
+                                        &rp_msg->private_key,
+                                        conv_name,                             
       
+                                        rd_count, rd);    
+      if (GNUNET_OK == res)
       {
-       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                       _("Failed to cache encrypted block of my own zone!\n"));
-       res = GNUNET_SYSERR;
-      }
-      GNUNET_free (block);
-      
-      for (zm = monitor_head; NULL != zm; zm = zm->next)    
-               if (0 == memcmp (&rp_msg->private_key, &zm->zone,
-                               sizeof (struct GNUNET_CRYPTO_EccPrivateKey)))
-                       send_lookup_response (monitor_nc,
-                                                               zm->nc->client,
-                                                               zm->request_id,
-                                                               
&rp_msg->private_key,
-                                                               conv_name,
-                                                               rd_count, rd);
-    }    
-    GNUNET_free (conv_name);
+       struct ZoneMonitor *zm;
+       struct GNUNET_NAMESTORE_Block *block;
+       
+       if (0 == rd_count)
+         block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
+                                                GNUNET_TIME_UNIT_ZERO_ABS,
+                                                conv_name,
+                                                rd, rd_count);
+       else
+         block = GNUNET_NAMESTORE_block_create (&rp_msg->private_key,
+                                                GNUNET_TIME_UNIT_FOREVER_ABS,
+                                                conv_name,
+                                                rd, rd_count);
+       if (GNUNET_OK !=
+           GSN_database->cache_block (GSN_database->cls,
+                                      block))
+       {
+         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                     _("Failed to cache encrypted block of my own zone!\n"));
+         res = GNUNET_SYSERR;
+       }
+       GNUNET_free (block);
+       
+       for (zm = monitor_head; NULL != zm; zm = zm->next)    
+         if (0 == memcmp (&rp_msg->private_key, &zm->zone,
+                          sizeof (struct GNUNET_CRYPTO_EccPrivateKey)))
+           send_lookup_response (monitor_nc,
+                                 zm->nc->client,
+                                 zm->request_id,
+                                 &rp_msg->private_key,
+                                 conv_name,
+                                 rd_count, rd);
+      }    
+      GNUNET_free (conv_name);
+    }
   }
   
   /* Send response */




reply via email to

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