aboutsummaryrefslogtreecommitdiff
path: root/src/psyc/gnunet-service-psyc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/psyc/gnunet-service-psyc.c')
-rw-r--r--src/psyc/gnunet-service-psyc.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c
index c67a702a7..6aa0ad961 100644
--- a/src/psyc/gnunet-service-psyc.c
+++ b/src/psyc/gnunet-service-psyc.c
@@ -1642,6 +1642,7 @@ client_recv_slave_join (void *cls, struct GNUNET_SERVER_Client *client,
1642 sizeof (*req), relay_size, join_msg_size, req_size); 1642 sizeof (*req), relay_size, join_msg_size, req_size);
1643 GNUNET_break (0); 1643 GNUNET_break (0);
1644 GNUNET_SERVER_client_disconnect (client); 1644 GNUNET_SERVER_client_disconnect (client);
1645 GNUNET_free (slv);
1645 return; 1646 return;
1646 } 1647 }
1647 if (0 < slv->relay_count) 1648 if (0 < slv->relay_count)
@@ -1753,14 +1754,21 @@ static void
1753client_recv_join_decision (void *cls, struct GNUNET_SERVER_Client *client, 1754client_recv_join_decision (void *cls, struct GNUNET_SERVER_Client *client,
1754 const struct GNUNET_MessageHeader *msg) 1755 const struct GNUNET_MessageHeader *msg)
1755{ 1756{
1756 struct Channel * 1757 const struct GNUNET_PSYC_JoinDecisionMessage *dcsn
1757 chn = GNUNET_SERVER_client_get_user_context (client, struct Channel); 1758 = (const struct GNUNET_PSYC_JoinDecisionMessage *) msg;
1758 GNUNET_assert (GNUNET_YES == chn->is_master); 1759 struct Channel *chn;
1759 struct Master *mst = (struct Master *) chn; 1760 struct Master *mst;
1760
1761 struct GNUNET_PSYC_JoinDecisionMessage *
1762 dcsn = (struct GNUNET_PSYC_JoinDecisionMessage *) msg;
1763 struct JoinDecisionClosure jcls; 1761 struct JoinDecisionClosure jcls;
1762
1763 chn = GNUNET_SERVER_client_get_user_context (client, struct Channel);
1764 if (NULL == chn)
1765 {
1766 GNUNET_break (0);
1767 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
1768 return;
1769 }
1770 GNUNET_assert (GNUNET_YES == chn->is_master);
1771 mst = (struct Master *) chn;
1764 jcls.is_admitted = ntohl (dcsn->is_admitted); 1772 jcls.is_admitted = ntohl (dcsn->is_admitted);
1765 jcls.msg 1773 jcls.msg
1766 = (sizeof (*dcsn) + sizeof (*jcls.msg) <= ntohs (msg->size)) 1774 = (sizeof (*dcsn) + sizeof (*jcls.msg) <= ntohs (msg->size))
@@ -2266,6 +2274,7 @@ store_recv_state_var (void *cls, const char *name,
2266 GNUNET_SERVER_notification_context_add (nc, opcls->client); 2274 GNUNET_SERVER_notification_context_add (nc, opcls->client);
2267 GNUNET_SERVER_notification_context_unicast (nc, opcls->client, &op->header, 2275 GNUNET_SERVER_notification_context_unicast (nc, opcls->client, &op->header,
2268 GNUNET_NO); 2276 GNUNET_NO);
2277 GNUNET_free (op);
2269 return GNUNET_YES; 2278 return GNUNET_YES;
2270} 2279}
2271 2280