aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-gns-gtk_zone.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/gnunet-gns-gtk_zone.c')
-rw-r--r--src/gns/gnunet-gns-gtk_zone.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/gns/gnunet-gns-gtk_zone.c b/src/gns/gnunet-gns-gtk_zone.c
index f7e05063..b80a22e9 100644
--- a/src/gns/gnunet-gns-gtk_zone.c
+++ b/src/gns/gnunet-gns-gtk_zone.c
@@ -166,19 +166,24 @@ void zone_iteration_proc (void *cls,
166 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key, 166 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *zone_key,
167 struct GNUNET_TIME_Absolute expire, 167 struct GNUNET_TIME_Absolute expire,
168 const char *name, 168 const char *name,
169 unsigned int rd_len, 169 unsigned int rd_count,
170 const struct GNUNET_NAMESTORE_RecordData *rd, 170 const struct GNUNET_NAMESTORE_RecordData *rd,
171 const struct GNUNET_CRYPTO_RsaSignature *signature) 171 const struct GNUNET_CRYPTO_RsaSignature *signature)
172{ 172{
173 struct ZoneIteration_Context * zc_ctx = cls; 173 struct ZoneIteration_Context * zc_ctx = cls;
174 GtkTreeIter toplevel; 174 GtkTreeIter toplevel;
175 GtkTreeIter child;
176 int c;
177
175 GNUNET_assert (zc_ctx != NULL); 178 GNUNET_assert (zc_ctx != NULL);
176 if ((NULL == zone_key) && (NULL == name)) 179 if ((NULL == zone_key) && (NULL == name))
177 { 180 {
178 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone `%s 'iteration done\n", GNUNET_h2s(&zc_ctx->zone)); 181 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone `%s 'iteration done\n", GNUNET_h2s(&zc_ctx->zone));
182 GNUNET_free (zc_ctx);
179 return; 183 return;
180 } 184 }
181 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone `%s' iteration result `%s'\n", GNUNET_h2s(&zc_ctx->zone), name); 185 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Zone `%s' iteration result `%s', %u records\n",
186 GNUNET_h2s(&zc_ctx->zone), name, rd_count);
182 187
183 GNUNET_assert(GTK_IS_TREE_STORE(zc_ctx->ts)); 188 GNUNET_assert(GTK_IS_TREE_STORE(zc_ctx->ts));
184 gtk_tree_store_append(zc_ctx->ts, &toplevel, NULL); 189 gtk_tree_store_append(zc_ctx->ts, &toplevel, NULL);
@@ -186,6 +191,13 @@ void zone_iteration_proc (void *cls,
186 gtk_tree_store_set(zc_ctx->ts, &toplevel, 191 gtk_tree_store_set(zc_ctx->ts, &toplevel,
187 TREE_COL_NAME, name, 192 TREE_COL_NAME, name,
188 -1); 193 -1);
194
195 /* Append elements for records */
196 for (c = 0; c < rd_count; c ++)
197 {
198 gtk_tree_store_append(zc_ctx->ts, &child, &toplevel);
199 }
200
189 GNUNET_NAMESTORE_zone_iterator_next(zc_ctx->it); 201 GNUNET_NAMESTORE_zone_iterator_next(zc_ctx->it);
190} 202}
191 203