- GNUNET_CLIENT_receive (zm->h,
- &handle_updates,
- zm,
- GNUNET_TIME_UNIT_FOREVER_REL);
- zm->monitor (zm->cls,
+ }
+ return GNUNET_OK;
+}
+
+
+/**
+ * We've received a notification about a change to our zone.
+ * Forward to monitor callback.
+ *
+ * @param cls the zone monitor handle
+ * @param lrm the message from the service.
+ */
+static void
+handle_result (void *cls,
+ const struct RecordResultMessage *lrm)
+{
+ struct GNUNET_NAMESTORE_ZoneMonitor *zm = cls;
+ size_t name_len;
+ size_t rd_len;
+ unsigned rd_count;
+ const char *name_tmp;
+ const char *rd_ser_tmp;
+
+ rd_len = ntohs (lrm->rd_len);
+ rd_count = ntohs (lrm->rd_count);
+ name_len = ntohs (lrm->name_len);
+ name_tmp = (const char *) &lrm[1];
+ rd_ser_tmp = (const char *) &name_tmp[name_len];
+ {
+ struct GNUNET_GNSRECORD_Data rd[rd_count];
+
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_GNSRECORD_records_deserialize (rd_len,
+ rd_ser_tmp,
+ rd_count,
+ rd));
+ zm->monitor (zm->monitor_cls,