summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-08-24 22:42:36 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-08-24 22:42:36 +0000
commite9c23061dfde4ecc54da4b5d588ebe2c54e798d9 (patch)
tree97fa1b88571f915878250cc352ec9853fe9a67b9 /src
parent9894aa789be33fee93af458646ce8ee143abfd75 (diff)
peerstore: fix
Diffstat (limited to 'src')
-rw-r--r--src/peerstore/gnunet-service-peerstore.c11
-rw-r--r--src/peerstore/peerstore_common.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/peerstore/gnunet-service-peerstore.c b/src/peerstore/gnunet-service-peerstore.c
index 97c272b18..4ea50cedb 100644
--- a/src/peerstore/gnunet-service-peerstore.c
+++ b/src/peerstore/gnunet-service-peerstore.c
@@ -409,13 +409,18 @@ handle_store (void *cls, struct GNUNET_SERVER_Client *client,
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Received a store request (size: %lu) for sub system `%s', peer `%s', key `%s'\n",
+ "Received a store request (size: %lu).\n"
+ " Sub system `%s'\n"
+ " Peer `%s'\n"
+ " Key `%s'\n"
+ " Value size %lu\n"
+ " Options: %d.\n",
record->value_size, record->sub_system, GNUNET_i2s (record->peer),
- record->key);
+ record->key, record->value_size, ntohl (srm->options));
if (GNUNET_OK !=
db->store_record (db->cls, record->sub_system, record->peer, record->key,
record->value, record->value_size, *record->expiry,
- srm->options))
+ ntohl (srm->options)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Failed to store requested value, sqlite database error."));
diff --git a/src/peerstore/peerstore_common.c b/src/peerstore/peerstore_common.c
index 96b428aee..6279d9ead 100644
--- a/src/peerstore/peerstore_common.c
+++ b/src/peerstore/peerstore_common.c
@@ -164,7 +164,7 @@ PEERSTORE_create_record_mq_envelope (const char *sub_system,
}
srm->sub_system_size = htons (ss_size);
srm->value_size = htons (value_size);
- srm->options = options;
+ srm->options = htonl (options);
dummy = &srm[1];
memcpy (dummy, sub_system, ss_size);
dummy += ss_size;