[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r31563 - gnunet/src/mesh
From: |
gnunet |
Subject: |
[GNUnet-SVN] r31563 - gnunet/src/mesh |
Date: |
Thu, 19 Dec 2013 14:26:27 +0100 |
Author: bartpolot
Date: 2013-12-19 14:26:27 +0100 (Thu, 19 Dec 2013)
New Revision: 31563
Modified:
gnunet/src/mesh/gnunet-mesh.c
Log:
- use proper signedness
Modified: gnunet/src/mesh/gnunet-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-mesh.c 2013-12-19 13:26:12 UTC (rev 31562)
+++ gnunet/src/mesh/gnunet-mesh.c 2013-12-19 13:26:27 UTC (rev 31563)
@@ -150,8 +150,8 @@
GNUNET_assert (size >= total_size);
msg = buf;
- msg->size = ntohs (total_size);
- msg->type = ntohs (GNUNET_MESSAGE_TYPE_MESH_CLI);
+ msg->size = htons (total_size);
+ msg->type = htons (GNUNET_MESSAGE_TYPE_MESH_CLI);
memcpy (&msg[1], cls, data_size);
listen_stdio ();
@@ -287,6 +287,7 @@
create_channel (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct GNUNET_PeerIdentity pid;
+ enum GNUNET_MESH_ChannelOption opt;
GNUNET_assert (NULL == ch);
@@ -302,8 +303,8 @@
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Connecting to `%s'\n", target_id);
- ch = GNUNET_MESH_channel_create (mh, NULL, &pid, target_port,
- GNUNET_MESH_OPTION_DEFAULT);
+ opt = GNUNET_MESH_OPTION_DEFAULT | GNUNET_MESH_OPTION_RELIABLE;
+ ch = GNUNET_MESH_channel_create (mh, NULL, &pid, target_port, opt);
listen_stdio ();
}
@@ -328,7 +329,7 @@
void **channel_ctx,
const struct GNUNET_MessageHeader *message)
{
- int16_t len;
+ uint16_t len;
GNUNET_break (ch == channel);
len = ntohs (message->size) - sizeof (*message);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r31563 - gnunet/src/mesh,
gnunet <=