aboutsummaryrefslogtreecommitdiff
path: root/src/social/gnunet-service-social.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/social/gnunet-service-social.c')
-rw-r--r--src/social/gnunet-service-social.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c
index c75589811..d297a153b 100644
--- a/src/social/gnunet-service-social.c
+++ b/src/social/gnunet-service-social.c
@@ -467,17 +467,17 @@ client_send_msg (const struct Place *plc,
467 * Called after a PSYC master is started. 467 * Called after a PSYC master is started.
468 */ 468 */
469static void 469static void
470psyc_master_started (void *cls, uint64_t max_message_id) 470psyc_master_started (void *cls, int result, uint64_t max_message_id)
471{ 471{
472 struct Host *hst = cls; 472 struct Host *hst = cls;
473 struct Place *plc = &hst->plc; 473 struct Place *plc = &hst->plc;
474 plc->max_message_id = max_message_id; 474 plc->max_message_id = max_message_id;
475 plc->is_ready = GNUNET_YES; 475 plc->is_ready = GNUNET_YES;
476 476
477 struct CountersResult res; 477 struct GNUNET_PSYC_CountersResultMessage res;
478 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK); 478 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK);
479 res.header.size = htons (sizeof (res)); 479 res.header.size = htons (sizeof (res));
480 res.result_code = htonl (GNUNET_OK); 480 res.result_code = htonl (result - INT32_MIN);
481 res.max_message_id = GNUNET_htonll (plc->max_message_id); 481 res.max_message_id = GNUNET_htonll (plc->max_message_id);
482 482
483 client_send_msg (plc, &res.header); 483 client_send_msg (plc, &res.header);
@@ -507,17 +507,17 @@ psyc_recv_join_request (void *cls,
507 * Called after a PSYC slave is connected. 507 * Called after a PSYC slave is connected.
508 */ 508 */
509static void 509static void
510psyc_slave_connected (void *cls, uint64_t max_message_id) 510psyc_slave_connected (void *cls, int result, uint64_t max_message_id)
511{ 511{
512 struct Guest *gst = cls; 512 struct Guest *gst = cls;
513 struct Place *plc = &gst->plc; 513 struct Place *plc = &gst->plc;
514 plc->max_message_id = max_message_id; 514 plc->max_message_id = max_message_id;
515 plc->is_ready = GNUNET_YES; 515 plc->is_ready = GNUNET_YES;
516 516
517 struct CountersResult res; 517 struct GNUNET_PSYC_CountersResultMessage res;
518 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK); 518 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK);
519 res.header.size = htons (sizeof (res)); 519 res.header.size = htons (sizeof (res));
520 res.result_code = htonl (GNUNET_OK); 520 res.result_code = htonl (result - INT32_MIN);
521 res.max_message_id = GNUNET_htonll (plc->max_message_id); 521 res.max_message_id = GNUNET_htonll (plc->max_message_id);
522 522
523 client_send_msg (plc, &res.header); 523 client_send_msg (plc, &res.header);
@@ -608,7 +608,7 @@ client_recv_host_enter (void *cls, struct GNUNET_SERVER_Client *client,
608 { 608 {
609 plc = &hst->plc; 609 plc = &hst->plc;
610 610
611 struct CountersResult res; 611 struct GNUNET_PSYC_CountersResultMessage res;
612 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK); 612 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_HOST_ENTER_ACK);
613 res.header.size = htons (sizeof (res)); 613 res.header.size = htons (sizeof (res));
614 res.result_code = htonl (GNUNET_OK); 614 res.result_code = htonl (GNUNET_OK);
@@ -724,7 +724,7 @@ client_recv_guest_enter (void *cls, struct GNUNET_SERVER_Client *client,
724 { 724 {
725 plc = &gst->plc; 725 plc = &gst->plc;
726 726
727 struct CountersResult res; 727 struct GNUNET_PSYC_CountersResultMessage res;
728 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK); 728 res.header.type = htons (GNUNET_MESSAGE_TYPE_SOCIAL_GUEST_ENTER_ACK);
729 res.header.size = htons (sizeof (res)); 729 res.header.size = htons (sizeof (res));
730 res.result_code = htonl (GNUNET_OK); 730 res.result_code = htonl (GNUNET_OK);