gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r23521 - gnunet-gtk/src/setup


From: gnunet
Subject: [GNUnet-SVN] r23521 - gnunet-gtk/src/setup
Date: Thu, 30 Aug 2012 20:31:34 +0200

Author: grothoff
Date: 2012-08-30 20:31:34 +0200 (Thu, 30 Aug 2012)
New Revision: 23521

Modified:
   gnunet-gtk/src/setup/gnunet-setup-gns.c
Log:
-minor cleanup

Modified: gnunet-gtk/src/setup/gnunet-setup-gns.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-gns.c     2012-08-30 14:46:58 UTC (rev 
23520)
+++ gnunet-gtk/src/setup/gnunet-setup-gns.c     2012-08-30 18:31:34 UTC (rev 
23521)
@@ -666,7 +666,6 @@
   int valid = GNUNET_YES;
   struct GNUNET_NAMESTORE_RecordData rd;
   struct RemoveContext *rcc;
-
   char          *n_name;
   int           n_type;
   gboolean      n_public;
@@ -681,8 +680,7 @@
   gtk_tree_model_get(tm, &it,
                      GNS_TREESTORE_COL_NAME, &name,
                      -1);
-
-  if (TRUE == gtk_tree_model_iter_parent (tm, &parent, &it))
+  if (gtk_tree_model_iter_parent (tm, &parent, &it))
   {
     /* Removing a single record */
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -718,10 +716,12 @@
     
     if (GNUNET_YES == valid)
     {
-      if (FALSE == n_public)
+      if (n_public)
+        rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
+      else
         rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY | GNUNET_NAMESTORE_RF_PRIVATE;
-      else
-        rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY | GNUNET_NAMESTORE_RF_NONE;
+      if (n_is_relative)
+       rd.flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION;
       rd.record_type = n_type;
       rd.expiration_time = n_exp_time;
       GNUNET_NAMESTORE_string_to_value (n_type, n_value,
@@ -730,7 +730,8 @@
       rcc = GNUNET_malloc(sizeof (struct RemoveContext));
       rcc->path = strdup (path);
       // FIXME: need to keep 'struct GNUNET_NAMESTORE_QueueEntry' around...
-      GNUNET_NAMESTORE_record_remove (namestore, pkey, name, &rd, 
&update_treemodel_after_remove, rcc);
+      GNUNET_NAMESTORE_record_remove (namestore, pkey, name, &rd, 
+                                     &update_treemodel_after_remove, rcc);
       GNUNET_free ((void *) rd.data);
     }
     else
@@ -750,7 +751,8 @@
     rcc = GNUNET_malloc(sizeof (struct RemoveContext));
     rcc->path = strdup (path);
     // FIXME: need to keep 'struct GNUNET_NAMESTORE_QueueEntry' around...
-    GNUNET_NAMESTORE_record_remove (namestore, pkey, name, NULL, 
&update_treemodel_after_remove, rcc);
+    GNUNET_NAMESTORE_record_remove (namestore, pkey, name, NULL,
+                                   &update_treemodel_after_remove, rcc);
   }
   g_free (name);
 }




reply via email to

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