aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-08-30 18:31:34 +0000
committerChristian Grothoff <christian@grothoff.org>2012-08-30 18:31:34 +0000
commit93a97f89fa11ec27044f2b0919e346b83867c007 (patch)
treed4df3860c8307b88055ce6f5fe0a48df41a874a3
parent10e2fb8932d2d16222fd19ca06ad5a89ca0d38b4 (diff)
downloadgnunet-gtk-93a97f89fa11ec27044f2b0919e346b83867c007.tar.gz
gnunet-gtk-93a97f89fa11ec27044f2b0919e346b83867c007.zip
-minor cleanup
-rw-r--r--src/setup/gnunet-setup-gns.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/setup/gnunet-setup-gns.c b/src/setup/gnunet-setup-gns.c
index 09849e14..5d30ae61 100644
--- a/src/setup/gnunet-setup-gns.c
+++ b/src/setup/gnunet-setup-gns.c
@@ -666,7 +666,6 @@ check_name_validity_and_remove (const gchar *path)
666 int valid = GNUNET_YES; 666 int valid = GNUNET_YES;
667 struct GNUNET_NAMESTORE_RecordData rd; 667 struct GNUNET_NAMESTORE_RecordData rd;
668 struct RemoveContext *rcc; 668 struct RemoveContext *rcc;
669
670 char *n_name; 669 char *n_name;
671 int n_type; 670 int n_type;
672 gboolean n_public; 671 gboolean n_public;
@@ -681,8 +680,7 @@ check_name_validity_and_remove (const gchar *path)
681 gtk_tree_model_get(tm, &it, 680 gtk_tree_model_get(tm, &it,
682 GNS_TREESTORE_COL_NAME, &name, 681 GNS_TREESTORE_COL_NAME, &name,
683 -1); 682 -1);
684 683 if (gtk_tree_model_iter_parent (tm, &parent, &it))
685 if (TRUE == gtk_tree_model_iter_parent (tm, &parent, &it))
686 { 684 {
687 /* Removing a single record */ 685 /* Removing a single record */
688 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 686 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -718,10 +716,12 @@ check_name_validity_and_remove (const gchar *path)
718 716
719 if (GNUNET_YES == valid) 717 if (GNUNET_YES == valid)
720 { 718 {
721 if (FALSE == n_public) 719 if (n_public)
722 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY | GNUNET_NAMESTORE_RF_PRIVATE; 720 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY;
723 else 721 else
724 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY | GNUNET_NAMESTORE_RF_NONE; 722 rd.flags = GNUNET_NAMESTORE_RF_AUTHORITY | GNUNET_NAMESTORE_RF_PRIVATE;
723 if (n_is_relative)
724 rd.flags |= GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION;
725 rd.record_type = n_type; 725 rd.record_type = n_type;
726 rd.expiration_time = n_exp_time; 726 rd.expiration_time = n_exp_time;
727 GNUNET_NAMESTORE_string_to_value (n_type, n_value, 727 GNUNET_NAMESTORE_string_to_value (n_type, n_value,
@@ -730,7 +730,8 @@ check_name_validity_and_remove (const gchar *path)
730 rcc = GNUNET_malloc(sizeof (struct RemoveContext)); 730 rcc = GNUNET_malloc(sizeof (struct RemoveContext));
731 rcc->path = strdup (path); 731 rcc->path = strdup (path);
732 // FIXME: need to keep 'struct GNUNET_NAMESTORE_QueueEntry' around... 732 // FIXME: need to keep 'struct GNUNET_NAMESTORE_QueueEntry' around...
733 GNUNET_NAMESTORE_record_remove (namestore, pkey, name, &rd, &update_treemodel_after_remove, rcc); 733 GNUNET_NAMESTORE_record_remove (namestore, pkey, name, &rd,
734 &update_treemodel_after_remove, rcc);
734 GNUNET_free ((void *) rd.data); 735 GNUNET_free ((void *) rd.data);
735 } 736 }
736 else 737 else
@@ -750,7 +751,8 @@ check_name_validity_and_remove (const gchar *path)
750 rcc = GNUNET_malloc(sizeof (struct RemoveContext)); 751 rcc = GNUNET_malloc(sizeof (struct RemoveContext));
751 rcc->path = strdup (path); 752 rcc->path = strdup (path);
752 // FIXME: need to keep 'struct GNUNET_NAMESTORE_QueueEntry' around... 753 // FIXME: need to keep 'struct GNUNET_NAMESTORE_QueueEntry' around...
753 GNUNET_NAMESTORE_record_remove (namestore, pkey, name, NULL, &update_treemodel_after_remove, rcc); 754 GNUNET_NAMESTORE_record_remove (namestore, pkey, name, NULL,
755 &update_treemodel_after_remove, rcc);
754 } 756 }
755 g_free (name); 757 g_free (name);
756} 758}