struct GNUNET_GNSRECORD_Data *nick;
int res;
- res = GSN_database->lookup_records (GSN_database->cls, zone,
+ nick = NULL;
+ res = GSN_database->lookup_records (GSN_database->cls,
+ zone,
GNUNET_GNS_MASTERZONE_STR,
- &lookup_nick_it, &nick);
+ &lookup_nick_it,
+ &nick);
if ( (GNUNET_OK != res) ||
(NULL == nick) )
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending ZONE_ITERATION_STOP message\n");
- env = GNUNET_MQ_msg (msg,
- GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP);
- msg->gns_header.r_id = htonl (it->op_id);
- GNUNET_MQ_send (h->mq,
- env);
+ if (NULL != h->mq)
+ {
+ env = GNUNET_MQ_msg (msg,
+ GNUNET_MESSAGE_TYPE_NAMESTORE_ZONE_ITERATION_STOP);
+ msg->gns_header.r_id = htonl (it->op_id);
+ GNUNET_MQ_send (h->mq,
+ env);
+ }
free_ze (it);
}
res = GNUNET_PQ_eval_prepared_non_select (plugin->dbh,
"store_records",
params);
- if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != res)
+ if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != res)
return GNUNET_SYSERR;
}
return GNUNET_OK;
params,
&parse_result_call_iterator,
&pc);
- if (res < 0)
+ if (res <= 0)
return GNUNET_SYSERR;
return GNUNET_OK;
}
static void
monitor_sync_event (void *cls)
{
- GNUNET_assert (NULL == zone_publish_task);
+ if ( (NULL == zone_publish_task) &&
+ (NULL == namestore_iter) )
zone_publish_task = GNUNET_SCHEDULER_add_now (&publish_zone_dht_start,
NULL);
}