diff options
author | Gabor X Toth <*@tg-x.net> | 2016-06-06 20:31:03 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2016-06-06 20:31:03 +0000 |
commit | 49033aed99b605ba358ab67f9a8e25f117bdb93d (patch) | |
tree | f748a82f4065162b6555d6330952da9ff7e095d0 /src/psyc | |
parent | eaddede2ab93ecd09f4bb9514e682a2165b67718 (diff) | |
download | gnunet-49033aed99b605ba358ab67f9a8e25f117bdb93d.tar.gz gnunet-49033aed99b605ba358ab67f9a8e25f117bdb93d.zip |
fixes
Diffstat (limited to 'src/psyc')
-rw-r--r-- | src/psyc/gnunet-service-psyc.c | 8 | ||||
-rw-r--r-- | src/psyc/psyc_api.c | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index dc5697a07..8fd2fbf35 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c | |||
@@ -866,7 +866,7 @@ store_recv_fragment_replay_result (void *cls, int64_t result, | |||
866 | case GNUNET_SYSERR: | 866 | case GNUNET_SYSERR: |
867 | GNUNET_MULTICAST_replay_response (rh, NULL, | 867 | GNUNET_MULTICAST_replay_response (rh, NULL, |
868 | GNUNET_MULTICAST_REC_INTERNAL_ERROR); | 868 | GNUNET_MULTICAST_REC_INTERNAL_ERROR); |
869 | break; | 869 | return; |
870 | } | 870 | } |
871 | GNUNET_MULTICAST_replay_response_end (rh); | 871 | GNUNET_MULTICAST_replay_response_end (rh); |
872 | } | 872 | } |
@@ -2006,7 +2006,6 @@ transmit_notify (void *cls, size_t *data_size, void *data) | |||
2006 | send_message_ack (chn, tmit_msg->client); | 2006 | send_message_ack (chn, tmit_msg->client); |
2007 | 2007 | ||
2008 | GNUNET_CONTAINER_DLL_remove (chn->tmit_head, chn->tmit_tail, tmit_msg); | 2008 | GNUNET_CONTAINER_DLL_remove (chn->tmit_head, chn->tmit_tail, tmit_msg); |
2009 | GNUNET_free (tmit_msg); | ||
2010 | 2009 | ||
2011 | if (NULL != chn->tmit_head) | 2010 | if (NULL != chn->tmit_head) |
2012 | { | 2011 | { |
@@ -2016,8 +2015,10 @@ transmit_notify (void *cls, size_t *data_size, void *data) | |||
2016 | && tmit_msg->last_ptype < GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END) | 2015 | && tmit_msg->last_ptype < GNUNET_MESSAGE_TYPE_PSYC_MESSAGE_END) |
2017 | { | 2016 | { |
2018 | /* FIXME: handle partial message (when still in_transmit) */ | 2017 | /* FIXME: handle partial message (when still in_transmit) */ |
2018 | GNUNET_free (tmit_msg); | ||
2019 | return GNUNET_SYSERR; | 2019 | return GNUNET_SYSERR; |
2020 | } | 2020 | } |
2021 | GNUNET_free (tmit_msg); | ||
2021 | return ret; | 2022 | return ret; |
2022 | } | 2023 | } |
2023 | 2024 | ||
@@ -2393,6 +2394,8 @@ store_recv_fragment_history (void *cls, | |||
2393 | 2394 | ||
2394 | /** @todo FIXME: send only to requesting client */ | 2395 | /** @todo FIXME: send only to requesting client */ |
2395 | client_send_msg (chn, &res->header); | 2396 | client_send_msg (chn, &res->header); |
2397 | |||
2398 | GNUNET_free (res); | ||
2396 | return GNUNET_YES; | 2399 | return GNUNET_YES; |
2397 | } | 2400 | } |
2398 | 2401 | ||
@@ -2528,6 +2531,7 @@ store_recv_state_var (void *cls, const char *name, | |||
2528 | GNUNET_SERVER_notification_context_add (nc, op->client); | 2531 | GNUNET_SERVER_notification_context_add (nc, op->client); |
2529 | GNUNET_SERVER_notification_context_unicast (nc, op->client, &res->header, | 2532 | GNUNET_SERVER_notification_context_unicast (nc, op->client, &res->header, |
2530 | GNUNET_NO); | 2533 | GNUNET_NO); |
2534 | GNUNET_free (res); | ||
2531 | return GNUNET_YES; | 2535 | return GNUNET_YES; |
2532 | } | 2536 | } |
2533 | 2537 | ||
diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c index 018eb63ad..441c74a08 100644 --- a/src/psyc/psyc_api.c +++ b/src/psyc/psyc_api.c | |||
@@ -223,9 +223,10 @@ static void | |||
223 | channel_send_connect_msg (struct GNUNET_PSYC_Channel *chn) | 223 | channel_send_connect_msg (struct GNUNET_PSYC_Channel *chn) |
224 | { | 224 | { |
225 | uint16_t cmsg_size = ntohs (chn->connect_msg->size); | 225 | uint16_t cmsg_size = ntohs (chn->connect_msg->size); |
226 | struct GNUNET_MessageHeader * cmsg = GNUNET_malloc (cmsg_size); | 226 | struct GNUNET_MessageHeader *cmsg = GNUNET_malloc (cmsg_size); |
227 | memcpy (cmsg, chn->connect_msg, cmsg_size); | 227 | memcpy (cmsg, chn->connect_msg, cmsg_size); |
228 | GNUNET_CLIENT_MANAGER_transmit_now (chn->client, cmsg); | 228 | GNUNET_CLIENT_MANAGER_transmit_now (chn->client, cmsg); |
229 | GNUNET_free (cmsg); | ||
229 | } | 230 | } |
230 | 231 | ||
231 | 232 | ||
@@ -762,6 +763,7 @@ GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, | |||
762 | memcpy (&dcsn[1], join_resp, join_resp_size); | 763 | memcpy (&dcsn[1], join_resp, join_resp_size); |
763 | 764 | ||
764 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &dcsn->header); | 765 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &dcsn->header); |
766 | GNUNET_free (dcsn); | ||
765 | GNUNET_free (jh); | 767 | GNUNET_free (jh); |
766 | return GNUNET_OK; | 768 | return GNUNET_OK; |
767 | } | 769 | } |
@@ -1078,6 +1080,7 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *chn, | |||
1078 | result_cb, cls)); | 1080 | result_cb, cls)); |
1079 | 1081 | ||
1080 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1082 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1083 | GNUNET_free (req); | ||
1081 | } | 1084 | } |
1082 | 1085 | ||
1083 | 1086 | ||
@@ -1129,6 +1132,7 @@ GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *chn, | |||
1129 | result_cb, cls)); | 1132 | result_cb, cls)); |
1130 | 1133 | ||
1131 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1134 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1135 | GNUNET_free (req); | ||
1132 | } | 1136 | } |
1133 | 1137 | ||
1134 | 1138 | ||
@@ -1169,6 +1173,7 @@ channel_history_replay (struct GNUNET_PSYC_Channel *chn, | |||
1169 | memcpy (&req[1], method_prefix, method_size); | 1173 | memcpy (&req[1], method_prefix, method_size); |
1170 | 1174 | ||
1171 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1175 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1176 | GNUNET_free (req); | ||
1172 | return hist; | 1177 | return hist; |
1173 | } | 1178 | } |
1174 | 1179 | ||
@@ -1309,6 +1314,7 @@ channel_state_get (struct GNUNET_PSYC_Channel *chn, | |||
1309 | memcpy (&req[1], name, name_size); | 1314 | memcpy (&req[1], name, name_size); |
1310 | 1315 | ||
1311 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); | 1316 | GNUNET_CLIENT_MANAGER_transmit (chn->client, &req->header); |
1317 | GNUNET_free (req); | ||
1312 | return sr; | 1318 | return sr; |
1313 | } | 1319 | } |
1314 | 1320 | ||