[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: fix misc namestore crashes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: fix misc namestore crashes from pq migration |
Date: |
Fri, 23 Jun 2017 16:05:09 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 2cc0ab371 fix misc namestore crashes from pq migration
2cc0ab371 is described below
commit 2cc0ab3717d0193af0a8b5be4aa367ae1874a812
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Jun 23 16:05:07 2017 +0200
fix misc namestore crashes from pq migration
---
src/namestore/gnunet-service-namestore.c | 7 +++++--
src/namestore/namestore_api.c | 13 ++++++++-----
src/namestore/plugin_namestore_postgres.c | 4 ++--
src/zonemaster/gnunet-service-zonemaster.c | 3 ++-
4 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/src/namestore/gnunet-service-namestore.c
b/src/namestore/gnunet-service-namestore.c
index 6cb4290a0..b27cfb732 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -414,9 +414,12 @@ get_nick_record (const struct
GNUNET_CRYPTO_EcdsaPrivateKey *zone)
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) )
{
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c
index 933ba7b95..92068cc01 100644
--- a/src/namestore/namestore_api.c
+++ b/src/namestore/namestore_api.c
@@ -1303,11 +1303,14 @@ GNUNET_NAMESTORE_zone_iteration_stop (struct
GNUNET_NAMESTORE_ZoneIterator *it)
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);
}
diff --git a/src/namestore/plugin_namestore_postgres.c
b/src/namestore/plugin_namestore_postgres.c
index c2ea3d0a6..491cec1cb 100644
--- a/src/namestore/plugin_namestore_postgres.c
+++ b/src/namestore/plugin_namestore_postgres.c
@@ -229,7 +229,7 @@ namestore_postgres_store_records (void *cls,
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;
@@ -372,7 +372,7 @@ namestore_postgres_lookup_records (void *cls,
params,
&parse_result_call_iterator,
&pc);
- if (res < 0)
+ if (res <= 0)
return GNUNET_SYSERR;
return GNUNET_OK;
}
diff --git a/src/zonemaster/gnunet-service-zonemaster.c
b/src/zonemaster/gnunet-service-zonemaster.c
index 08a09de34..b3a2cb8b3 100644
--- a/src/zonemaster/gnunet-service-zonemaster.c
+++ b/src/zonemaster/gnunet-service-zonemaster.c
@@ -648,7 +648,8 @@ handle_monitor_event (void *cls,
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);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: fix misc namestore crashes from pq migration,
gnunet <=