diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-08-12 11:52:45 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-08-12 11:52:45 +0000 |
commit | 91e06fa0095e2e2cd813bc692a8ae224836325bf (patch) | |
tree | 0ff2010b4f7cb27c70e2922bf1afa85d018eb2c4 /src | |
parent | 10c931b1357a9bc12ebbe1f7a98db0b8121909a7 (diff) | |
download | gnunet-91e06fa0095e2e2cd813bc692a8ae224836325bf.tar.gz gnunet-91e06fa0095e2e2cd813bc692a8ae224836325bf.zip |
- fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/mesh_api_enc.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesh/mesh_api_enc.c b/src/mesh/mesh_api_enc.c index 113ff46d0..35a2cce14 100644 --- a/src/mesh/mesh_api_enc.c +++ b/src/mesh/mesh_api_enc.c | |||
@@ -27,8 +27,8 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_peer_lib.h" | 28 | #include "gnunet_peer_lib.h" |
29 | #include "gnunet_mesh_service_enc.h" | 29 | #include "gnunet_mesh_service_enc.h" |
30 | #include "mesh.h" | 30 | #include "mesh_enc.h" |
31 | #include "mesh_protocol.h" | 31 | #include "mesh_protocol_enc.h" |
32 | 32 | ||
33 | #define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__) | 33 | #define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__) |
34 | 34 | ||
@@ -816,7 +816,7 @@ process_channel_created (struct GNUNET_MESH_Handle *h, | |||
816 | else | 816 | else |
817 | ch->ooorder = GNUNET_NO; | 817 | ch->ooorder = GNUNET_NO; |
818 | 818 | ||
819 | LOG (GNUNET_ERROR_TYPE_DEBUG, " created channel %p\n", t); | 819 | LOG (GNUNET_ERROR_TYPE_DEBUG, " created channel %p\n", ch); |
820 | ch->ctx = h->new_channel (h->cls, ch, &msg->peer, ch->port); | 820 | ch->ctx = h->new_channel (h->cls, ch, &msg->peer, ch->port); |
821 | LOG (GNUNET_ERROR_TYPE_DEBUG, "User notified\n"); | 821 | LOG (GNUNET_ERROR_TYPE_DEBUG, "User notified\n"); |
822 | } | 822 | } |
@@ -887,11 +887,11 @@ process_incoming_data (struct GNUNET_MESH_Handle *h, | |||
887 | 887 | ||
888 | dmsg = (struct GNUNET_MESH_LocalData *) message; | 888 | dmsg = (struct GNUNET_MESH_LocalData *) message; |
889 | 889 | ||
890 | ch = retrieve_channel (h, ntohl (dmsg->chid)); | 890 | ch = retrieve_channel (h, ntohl (dmsg->id)); |
891 | payload = (struct GNUNET_MessageHeader *) &dmsg[1]; | 891 | payload = (struct GNUNET_MessageHeader *) &dmsg[1]; |
892 | LOG (GNUNET_ERROR_TYPE_DEBUG, " %s data on channel %s [%X]\n", | 892 | LOG (GNUNET_ERROR_TYPE_DEBUG, " %s data on channel %s [%X]\n", |
893 | ch->chid >= GNUNET_MESH_LOCAL_CHANNEL_ID_SERV ? "fwd" : "bck", | 893 | ch->chid >= GNUNET_MESH_LOCAL_CHANNEL_ID_SERV ? "fwd" : "bck", |
894 | GNUNET_i2s (GNUNET_PEER_resolve2 (ch->peer)), ntohl (dmsg->chid)); | 894 | GNUNET_i2s (GNUNET_PEER_resolve2 (ch->peer)), ntohl (dmsg->id)); |
895 | if (NULL == ch) | 895 | if (NULL == ch) |
896 | { | 896 | { |
897 | /* Channel was ignored/destroyed, probably service didn't get it yet */ | 897 | /* Channel was ignored/destroyed, probably service didn't get it yet */ |
@@ -941,7 +941,6 @@ process_ack (struct GNUNET_MESH_Handle *h, | |||
941 | MESH_ChannelNumber chid; | 941 | MESH_ChannelNumber chid; |
942 | 942 | ||
943 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Got an ACK!\n"); | 943 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Got an ACK!\n"); |
944 | h->acks_recv++; | ||
945 | msg = (struct GNUNET_MESH_LocalAck *) message; | 944 | msg = (struct GNUNET_MESH_LocalAck *) message; |
946 | chid = ntohl (msg->channel_id); | 945 | chid = ntohl (msg->channel_id); |
947 | ch = retrieve_channel (h, chid); | 946 | ch = retrieve_channel (h, chid); |
@@ -1179,7 +1178,7 @@ send_callback (void *cls, size_t size, void *buf) | |||
1179 | psize += sizeof (struct GNUNET_MESH_LocalData); | 1178 | psize += sizeof (struct GNUNET_MESH_LocalData); |
1180 | GNUNET_assert (size >= psize); | 1179 | GNUNET_assert (size >= psize); |
1181 | dmsg->header.size = htons (psize); | 1180 | dmsg->header.size = htons (psize); |
1182 | dmsg->chid = htonl (ch->chid); | 1181 | dmsg->id = htonl (ch->chid); |
1183 | dmsg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA); | 1182 | dmsg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_DATA); |
1184 | LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload type %s\n", | 1183 | LOG (GNUNET_ERROR_TYPE_DEBUG, "# payload type %s\n", |
1185 | GNUNET_MESH_DEBUG_M2S (ntohs (mh->type))); | 1184 | GNUNET_MESH_DEBUG_M2S (ntohs (mh->type))); |
@@ -1502,7 +1501,7 @@ GNUNET_MESH_channel_destroy (struct GNUNET_MESH_Channel *channel) | |||
1502 | */ | 1501 | */ |
1503 | const union MeshChannelInfo * | 1502 | const union MeshChannelInfo * |
1504 | GNUNET_MESH_channel_get_info (struct GNUNET_MESH_Channel *channel, | 1503 | GNUNET_MESH_channel_get_info (struct GNUNET_MESH_Channel *channel, |
1505 | enum MeshChannelOption option, ...) | 1504 | enum MeshOption option, ...) |
1506 | { | 1505 | { |
1507 | const union MeshChannelInfo *ret; | 1506 | const union MeshChannelInfo *ret; |
1508 | 1507 | ||