diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-05 18:49:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-05 18:49:55 +0000 |
commit | 392b0d1d0ecb68a60119cef1ac986da3064f3adf (patch) | |
tree | fd4834d6fcde856b66eb0e6f80ca547c6c5e6557 /src/conversation | |
parent | a94795b640f8d657759c4ab840668ed0262ce24b (diff) | |
download | gnunet-392b0d1d0ecb68a60119cef1ac986da3064f3adf.tar.gz gnunet-392b0d1d0ecb68a60119cef1ac986da3064f3adf.zip |
-update to reflect mesh API change
Diffstat (limited to 'src/conversation')
-rw-r--r-- | src/conversation/gnunet-service-conversation.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c index daf51b54e..982e188d5 100644 --- a/src/conversation/gnunet-service-conversation.c +++ b/src/conversation/gnunet-service-conversation.c | |||
@@ -976,12 +976,19 @@ handle_mesh_audio_message (void *cls, | |||
976 | size_t msize = ntohs (message->size) - sizeof (struct MeshAudioMessage); | 976 | size_t msize = ntohs (message->size) - sizeof (struct MeshAudioMessage); |
977 | char buf[msize + sizeof (struct ClientAudioMessage)]; | 977 | char buf[msize + sizeof (struct ClientAudioMessage)]; |
978 | struct ClientAudioMessage *cam; | 978 | struct ClientAudioMessage *cam; |
979 | const union GNUNET_MESH_TunnelInfo *info; | ||
979 | 980 | ||
980 | msg = (const struct MeshAudioMessage *) message; | 981 | msg = (const struct MeshAudioMessage *) message; |
981 | if (NULL == line) | 982 | if (NULL == line) |
982 | { | 983 | { |
983 | sender = *GNUNET_MESH_tunnel_get_info (tunnel, | 984 | info = GNUNET_MESH_tunnel_get_info (tunnel, |
984 | GNUNET_MESH_OPTION_PEER)->peer; | 985 | GNUNET_MESH_OPTION_PEER); |
986 | if (NULL == info) | ||
987 | { | ||
988 | GNUNET_break (0); | ||
989 | return GNUNET_OK; | ||
990 | } | ||
991 | sender = info->peer; | ||
985 | for (line = lines_head; NULL != line; line = line->next) | 992 | for (line = lines_head; NULL != line; line = line->next) |
986 | if ( (line->local_line == ntohl (msg->remote_line)) && | 993 | if ( (line->local_line == ntohl (msg->remote_line)) && |
987 | (LS_CALLEE_CONNECTED == line->status) && | 994 | (LS_CALLEE_CONNECTED == line->status) && |
@@ -996,7 +1003,7 @@ handle_mesh_audio_message (void *cls, | |||
996 | "Received AUDIO data for non-existing line %u, dropping.\n", | 1003 | "Received AUDIO data for non-existing line %u, dropping.\n", |
997 | ntohl (msg->remote_line)); | 1004 | ntohl (msg->remote_line)); |
998 | return GNUNET_SYSERR; | 1005 | return GNUNET_SYSERR; |
999 | } | 1006 | } |
1000 | line->tunnel_unreliable = tunnel; | 1007 | line->tunnel_unreliable = tunnel; |
1001 | *tunnel_ctx = line; | 1008 | *tunnel_ctx = line; |
1002 | } | 1009 | } |
@@ -1063,7 +1070,8 @@ inbound_end (void *cls, | |||
1063 | line->tunnel_unreliable = NULL; | 1070 | line->tunnel_unreliable = NULL; |
1064 | return; | 1071 | return; |
1065 | } | 1072 | } |
1066 | GNUNET_assert (line->tunnel_reliable == tunnel); | 1073 | if (line->tunnel_reliable != tunnel) |
1074 | return; | ||
1067 | line->tunnel_reliable = NULL; | 1075 | line->tunnel_reliable = NULL; |
1068 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1076 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1069 | "Mesh tunnel destroyed by mesh\n"); | 1077 | "Mesh tunnel destroyed by mesh\n"); |