diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-06-04 20:54:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-06-04 20:54:24 +0200 |
commit | 2cce8be6b8fcb2baa0d7abde4bbe486cbcb3f983 (patch) | |
tree | 28bde1eaa1de1f569404d879689a411d9cdbe678 /src/transport/gnunet-communicator-unix.c | |
parent | 18c183d3cb8f12790ed55333519b53a535a5c906 (diff) | |
download | gnunet-2cce8be6b8fcb2baa0d7abde4bbe486cbcb3f983.tar.gz gnunet-2cce8be6b8fcb2baa0d7abde4bbe486cbcb3f983.zip |
misc bugfixes
Diffstat (limited to 'src/transport/gnunet-communicator-unix.c')
-rw-r--r-- | src/transport/gnunet-communicator-unix.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c index 642703f29..9bbc02c65 100644 --- a/src/transport/gnunet-communicator-unix.c +++ b/src/transport/gnunet-communicator-unix.c | |||
@@ -417,6 +417,7 @@ select_write_cb (void *cls) | |||
417 | struct Queue *queue = queue_tail; | 417 | struct Queue *queue = queue_tail; |
418 | const struct GNUNET_MessageHeader *msg = queue->msg; | 418 | const struct GNUNET_MessageHeader *msg = queue->msg; |
419 | size_t msg_size = ntohs (msg->size); | 419 | size_t msg_size = ntohs (msg->size); |
420 | const void *msg; | ||
420 | ssize_t sent; | 421 | ssize_t sent; |
421 | 422 | ||
422 | /* take queue of the ready list */ | 423 | /* take queue of the ready list */ |
@@ -432,12 +433,13 @@ select_write_cb (void *cls) | |||
432 | NULL); | 433 | NULL); |
433 | 434 | ||
434 | /* send 'msg' */ | 435 | /* send 'msg' */ |
436 | msg = queue->msg; | ||
435 | queue->msg = NULL; | 437 | queue->msg = NULL; |
436 | GNUNET_MQ_impl_send_continue (queue->mq); | 438 | GNUNET_MQ_impl_send_continue (queue->mq); |
437 | resend: | 439 | resend: |
438 | /* Send the data */ | 440 | /* Send the data */ |
439 | sent = GNUNET_NETWORK_socket_sendto (unix_sock, | 441 | sent = GNUNET_NETWORK_socket_sendto (unix_sock, |
440 | queue->msg, | 442 | msg, |
441 | msg_size, | 443 | msg_size, |
442 | (const struct sockaddr *) queue->address, | 444 | (const struct sockaddr *) queue->address, |
443 | queue->address_len); | 445 | queue->address_len); |