aboutsummaryrefslogtreecommitdiff
path: root/src/service/peerstore/peerstore_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/peerstore/peerstore_api.c')
-rw-r--r--src/service/peerstore/peerstore_api.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/service/peerstore/peerstore_api.c b/src/service/peerstore/peerstore_api.c
index 8770c36e4..481f4c6bb 100644
--- a/src/service/peerstore/peerstore_api.c
+++ b/src/service/peerstore/peerstore_api.c
@@ -1086,19 +1086,17 @@ GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
1086 GNUNET_PEERSTORE_Processor callback, 1086 GNUNET_PEERSTORE_Processor callback,
1087 void *callback_cls) 1087 void *callback_cls)
1088{ 1088{
1089 struct GNUNET_PEERSTORE_IterateContext *ic;
1090 struct GNUNET_PEERSTORE_WatchContext *wc; 1089 struct GNUNET_PEERSTORE_WatchContext *wc;
1091 1090
1092 wc = GNUNET_new (struct GNUNET_PEERSTORE_WatchContext); 1091 wc = GNUNET_new (struct GNUNET_PEERSTORE_WatchContext);
1093 wc->callback = callback; 1092 wc->callback = callback;
1094 wc->callback_cls = callback_cls; 1093 wc->callback_cls = callback_cls;
1095 wc->h = h; 1094 wc->h = h;
1096 wc->ic = ic;
1097 wc->key = key; 1095 wc->key = key;
1098 wc->peer = peer; 1096 wc->peer = peer;
1099 wc->sub_system = sub_system; 1097 wc->sub_system = sub_system;
1100 1098
1101 ic = GNUNET_PEERSTORE_iterate (h, 1099 wc->ic = GNUNET_PEERSTORE_iterate (h,
1102 sub_system, 1100 sub_system,
1103 peer, 1101 peer,
1104 key, 1102 key,
@@ -1121,7 +1119,6 @@ hello_updated (void *cls,
1121{ 1119{
1122 struct GNUNET_PEERSTORE_NotifyContext *nc = cls; 1120 struct GNUNET_PEERSTORE_NotifyContext *nc = cls;
1123 const struct GNUNET_MessageHeader *hello; 1121 const struct GNUNET_MessageHeader *hello;
1124 struct GNUNET_HELLO_Builder *builder;
1125 1122
1126 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1123 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1127 "hello_updated\n"); 1124 "hello_updated\n");
@@ -1136,7 +1133,6 @@ hello_updated (void *cls,
1136 if (NULL == record) 1133 if (NULL == record)
1137 return; 1134 return;
1138 hello = record->value; 1135 hello = record->value;
1139 builder = GNUNET_HELLO_builder_from_msg (hello);
1140 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1136 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1141 "hello_updated with expired %s and size %u for peer %s\n", 1137 "hello_updated with expired %s and size %u for peer %s\n",
1142 GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_builder_get_expiration_time (hello)), 1138 GNUNET_STRINGS_absolute_time_to_string (GNUNET_HELLO_builder_get_expiration_time (hello)),
@@ -1319,7 +1315,7 @@ GNUNET_PEERSTORE_hello_add (struct GNUNET_PEERSTORE_Handle *h,
1319{ 1315{
1320 struct GNUNET_HELLO_Builder *builder = GNUNET_HELLO_builder_from_msg (msg); 1316 struct GNUNET_HELLO_Builder *builder = GNUNET_HELLO_builder_from_msg (msg);
1321 struct GNUNET_PEERSTORE_StoreHelloContext *huc; 1317 struct GNUNET_PEERSTORE_StoreHelloContext *huc;
1322 struct GNUNET_PeerIdentity *pid; 1318 const struct GNUNET_PeerIdentity *pid;
1323 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get (); 1319 struct GNUNET_TIME_Absolute now = GNUNET_TIME_absolute_get ();
1324 struct GNUNET_TIME_Absolute hello_exp = 1320 struct GNUNET_TIME_Absolute hello_exp =
1325 GNUNET_HELLO_builder_get_expiration_time (msg); 1321 GNUNET_HELLO_builder_get_expiration_time (msg);