diff options
author | Gabor X Toth <*@tg-x.net> | 2014-05-23 14:41:42 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2014-05-23 14:41:42 +0000 |
commit | c0d549b6ab07a951380b807f1a1c1a767bfd5be0 (patch) | |
tree | ba70cffb14676ea17c3ca6ef302d9ffe6d3fc3f2 /src/psyc/psyc_api.c | |
parent | 5fe013c4b7b150533839dbca964ffcd2b3fe80a5 (diff) | |
download | gnunet-c0d549b6ab07a951380b807f1a1c1a767bfd5be0.tar.gz gnunet-c0d549b6ab07a951380b807f1a1c1a767bfd5be0.zip |
psyc, multicast: fixes, comments
Diffstat (limited to 'src/psyc/psyc_api.c')
-rw-r--r-- | src/psyc/psyc_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c index 82ff18347..ee49a584f 100644 --- a/src/psyc/psyc_api.c +++ b/src/psyc/psyc_api.c | |||
@@ -1272,7 +1272,7 @@ GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, | |||
1272 | struct GNUNET_PSYC_Channel *ch = &jh->mst->ch; | 1272 | struct GNUNET_PSYC_Channel *ch = &jh->mst->ch; |
1273 | 1273 | ||
1274 | struct MasterJoinDecision *dcsn; | 1274 | struct MasterJoinDecision *dcsn; |
1275 | struct GNUNET_PSYC_MessageHeader *pmsg; | 1275 | struct GNUNET_PSYC_MessageHeader *pmsg = NULL; |
1276 | uint16_t pmsg_size = 0; | 1276 | uint16_t pmsg_size = 0; |
1277 | /* FIXME: | 1277 | /* FIXME: |
1278 | sizeof (*pmsg) | 1278 | sizeof (*pmsg) |
@@ -1285,14 +1285,14 @@ GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, | |||
1285 | struct MessageQueue * | 1285 | struct MessageQueue * |
1286 | mq = GNUNET_malloc (sizeof (*mq) + sizeof (*dcsn) + relay_size + pmsg_size); | 1286 | mq = GNUNET_malloc (sizeof (*mq) + sizeof (*dcsn) + relay_size + pmsg_size); |
1287 | dcsn = (struct MasterJoinDecision *) &mq[1]; | 1287 | dcsn = (struct MasterJoinDecision *) &mq[1]; |
1288 | dcsn->header.size = htons (sizeof (*dcsn) + relay_size + pmsg_size); | ||
1288 | dcsn->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION); | 1289 | dcsn->header.type = htons (GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION); |
1289 | dcsn->header.size = htons (sizeof (*mq) + sizeof (*dcsn) | ||
1290 | + relay_size + pmsg_size); | ||
1291 | dcsn->is_admitted = (GNUNET_YES == is_admitted) ? GNUNET_YES : GNUNET_NO; | 1290 | dcsn->is_admitted = (GNUNET_YES == is_admitted) ? GNUNET_YES : GNUNET_NO; |
1292 | dcsn->slave_key = jh->slave_key; | 1291 | dcsn->slave_key = jh->slave_key; |
1293 | 1292 | ||
1294 | /* FIXME: add message parts to pmsg */ | 1293 | /* FIXME: add message parts to pmsg */ |
1295 | memcpy (&dcsn[1], pmsg, pmsg_size); | 1294 | if (0 < pmsg_size) |
1295 | memcpy (&dcsn[1], pmsg, pmsg_size); | ||
1296 | 1296 | ||
1297 | GNUNET_CONTAINER_DLL_insert_tail (ch->tmit_head, ch->tmit_tail, mq); | 1297 | GNUNET_CONTAINER_DLL_insert_tail (ch->tmit_head, ch->tmit_tail, mq); |
1298 | transmit_next (ch); | 1298 | transmit_next (ch); |