gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r31415 - gnunet/src/conversation


From: gnunet
Subject: [GNUnet-SVN] r31415 - gnunet/src/conversation
Date: Mon, 16 Dec 2013 16:36:11 +0100

Author: harsha
Date: 2013-12-16 16:36:11 +0100 (Mon, 16 Dec 2013)
New Revision: 31415

Modified:
   gnunet/src/conversation/conversation.h
   gnunet/src/conversation/gnunet-service-conversation.c
Log:
- extend mesh audio messag to contain source line number.  This is needed to 
find the correct client channel to link unreliable audio channel


Modified: gnunet/src/conversation/conversation.h
===================================================================
--- gnunet/src/conversation/conversation.h      2013-12-16 15:13:51 UTC (rev 
31414)
+++ gnunet/src/conversation/conversation.h      2013-12-16 15:36:11 UTC (rev 
31415)
@@ -352,8 +352,13 @@
   /**
    * Target line on the receiving end.
    */
-  uint32_t remote_line;
+  uint32_t remote_line GNUNET_PACKED;
 
+  /**
+   * The source line sending this data
+   */
+  uint32_t source_line GNUNET_PACKED;
+
   /* followed by audio data */
 
 };

Modified: gnunet/src/conversation/gnunet-service-conversation.c
===================================================================
--- gnunet/src/conversation/gnunet-service-conversation.c       2013-12-16 
15:13:51 UTC (rev 31414)
+++ gnunet/src/conversation/gnunet-service-conversation.c       2013-12-16 
15:36:11 UTC (rev 31415)
@@ -753,6 +753,7 @@
   mam->header.size = htons (sizeof (struct MeshAudioMessage) + ch->audio_size);
   mam->header.type = htons (GNUNET_MESSAGE_TYPE_CONVERSATION_MESH_AUDIO);
   mam->remote_line = htonl (ch->remote_line);
+  mam->source_line = htonl (ch->line->local_line);
   memcpy (&mam[1], ch->audio_data, ch->audio_size);
   GNUNET_free (ch->audio_data);
   ch->audio_data = NULL;
@@ -1259,7 +1260,8 @@
                (0 == memcmp (&ch->target,
                              &sender,
                              sizeof (struct GNUNET_PeerIdentity))) &&
-               (NULL == ch->channel_unreliable) )
+               (NULL == ch->channel_unreliable) &&
+               (ch->remote_line == ntohl (msg->source_line)) )
             break;
         }
         break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]