diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-08-30 20:54:44 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-08-30 20:54:44 +0000 |
commit | 2e25d8c868521f318381a8b87c9f8c1c7c402b7c (patch) | |
tree | a5d9b8fca78e55da9d8c62ff8fe6d1d480a459e0 /src/set/set_api.c | |
parent | c92948f72526fe599680c06cbe80d0ffdc11f597 (diff) | |
download | gnunet-2e25d8c868521f318381a8b87c9f8c1c7c402b7c.tar.gz gnunet-2e25d8c868521f318381a8b87c9f8c1c7c402b7c.zip |
add test case for 'GNUNET_SET_copy_lazy', fix bugs
Diffstat (limited to 'src/set/set_api.c')
-rw-r--r-- | src/set/set_api.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/set/set_api.c b/src/set/set_api.c index aadc93678..920571a01 100644 --- a/src/set/set_api.c +++ b/src/set/set_api.c | |||
@@ -272,6 +272,9 @@ handle_copy_lazy (void *cls, | |||
272 | GNUNET_break (0); | 272 | GNUNET_break (0); |
273 | return; | 273 | return; |
274 | } | 274 | } |
275 | |||
276 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
277 | "Handling response to lazy copy\n"); | ||
275 | 278 | ||
276 | GNUNET_CONTAINER_DLL_remove (set->copy_req_head, | 279 | GNUNET_CONTAINER_DLL_remove (set->copy_req_head, |
277 | set->copy_req_tail, | 280 | set->copy_req_tail, |
@@ -555,9 +558,6 @@ create_internal (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
555 | struct GNUNET_SET_CreateMessage *create_msg; | 558 | struct GNUNET_SET_CreateMessage *create_msg; |
556 | struct GNUNET_SET_CopyLazyConnectMessage *copy_msg; | 559 | struct GNUNET_SET_CopyLazyConnectMessage *copy_msg; |
557 | 560 | ||
558 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
559 | "Creating new set (operation %u)\n", | ||
560 | op); | ||
561 | set = GNUNET_new (struct GNUNET_SET_Handle); | 561 | set = GNUNET_new (struct GNUNET_SET_Handle); |
562 | set->client = GNUNET_CLIENT_connect ("set", cfg); | 562 | set->client = GNUNET_CLIENT_connect ("set", cfg); |
563 | set->cfg = cfg; | 563 | set->cfg = cfg; |
@@ -574,12 +574,18 @@ create_internal (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
574 | 574 | ||
575 | if (NULL == cookie) | 575 | if (NULL == cookie) |
576 | { | 576 | { |
577 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
578 | "Creating new set (operation %u)\n", | ||
579 | op); | ||
577 | mqm = GNUNET_MQ_msg (create_msg, | 580 | mqm = GNUNET_MQ_msg (create_msg, |
578 | GNUNET_MESSAGE_TYPE_SET_CREATE); | 581 | GNUNET_MESSAGE_TYPE_SET_CREATE); |
579 | create_msg->operation = htonl (op); | 582 | create_msg->operation = htonl (op); |
580 | } | 583 | } |
581 | else | 584 | else |
582 | { | 585 | { |
586 | LOG (GNUNET_ERROR_TYPE_DEBUG, | ||
587 | "Creating new set (lazy copy)\n", | ||
588 | op); | ||
583 | mqm = GNUNET_MQ_msg (copy_msg, | 589 | mqm = GNUNET_MQ_msg (copy_msg, |
584 | GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_CONNECT); | 590 | GNUNET_MESSAGE_TYPE_SET_COPY_LAZY_CONNECT); |
585 | copy_msg->cookie = *cookie; | 591 | copy_msg->cookie = *cookie; |