diff options
Diffstat (limited to 'src/cadet')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c index e04dcf620..41ecafa05 100644 --- a/src/cadet/gnunet-service-cadet_connection.c +++ b/src/cadet/gnunet-service-cadet_connection.c | |||
@@ -3389,13 +3389,13 @@ GCC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
3389 | struct GNUNET_MessageHeader *copy; | 3389 | struct GNUNET_MessageHeader *copy; |
3390 | unsigned char cbuf[size]; | 3390 | unsigned char cbuf[size]; |
3391 | 3391 | ||
3392 | copy = (struct GNUNET_MessageHeader *)cbuf; | 3392 | copy = (struct GNUNET_MessageHeader *) cbuf; |
3393 | GNUNET_memcpy (copy, message, size); | 3393 | GNUNET_memcpy (copy, message, size); |
3394 | if (GNUNET_MESSAGE_TYPE_CADET_AX == type) | 3394 | if (GNUNET_MESSAGE_TYPE_CADET_AX == type) |
3395 | { | 3395 | { |
3396 | struct GNUNET_CADET_AX *axmsg; | 3396 | struct GNUNET_CADET_AX *axmsg; |
3397 | 3397 | ||
3398 | axmsg = (struct GNUNET_CADET_AX *) message; | 3398 | axmsg = (struct GNUNET_CADET_AX *) copy; |
3399 | axmsg->cid = c->id; | 3399 | axmsg->cid = c->id; |
3400 | axmsg->pid = htonl (GCC_get_pid (c, fwd)); | 3400 | axmsg->pid = htonl (GCC_get_pid (c, fwd)); |
3401 | } | 3401 | } |
@@ -3403,13 +3403,14 @@ GCC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, | |||
3403 | { | 3403 | { |
3404 | struct GNUNET_CADET_KX *kmsg; | 3404 | struct GNUNET_CADET_KX *kmsg; |
3405 | 3405 | ||
3406 | kmsg = (struct GNUNET_CADET_KX *) message; | 3406 | GNUNET_assert (GNUNET_MESSAGE_TYPE_CADET_KX == type); |
3407 | kmsg = (struct GNUNET_CADET_KX *) copy; | ||
3407 | kmsg->reserved = htonl (0); | 3408 | kmsg->reserved = htonl (0); |
3408 | kmsg->cid = c->id; | 3409 | kmsg->cid = c->id; |
3409 | } | 3410 | } |
3410 | return send_prebuilt_message (copy, payload_type, payload_id, | 3411 | return send_prebuilt_message (copy, payload_type, payload_id, |
3411 | c, fwd, force, | 3412 | c, fwd, force, |
3412 | cont, cont_cls); | 3413 | cont, cont_cls); |
3413 | } | 3414 | } |
3414 | return send_prebuilt_message (message, payload_type, payload_id, | 3415 | return send_prebuilt_message (message, payload_type, payload_id, |
3415 | c, fwd, force, | 3416 | c, fwd, force, |