aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/microphone.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-03 18:19:50 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-03 18:19:50 +0000
commit68d8369974476a78d6a6ca20b937fcd59530690a (patch)
treef4baabe7506e4b6941a5f93f5b312e799941380f /src/conversation/microphone.c
parent9fd836bda9b9255d84fcaa0a463c5427980b3e79 (diff)
downloadgnunet-68d8369974476a78d6a6ca20b937fcd59530690a.tar.gz
gnunet-68d8369974476a78d6a6ca20b937fcd59530690a.zip
-removing header to avoid double-encapsulation overhead when going from helper to API
Diffstat (limited to 'src/conversation/microphone.c')
-rw-r--r--src/conversation/microphone.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/conversation/microphone.c b/src/conversation/microphone.c
index d994db889..2c399c74d 100644
--- a/src/conversation/microphone.c
+++ b/src/conversation/microphone.c
@@ -74,17 +74,17 @@ process_record_messages (void *cls,
74 const struct GNUNET_MessageHeader *msg) 74 const struct GNUNET_MessageHeader *msg)
75{ 75{
76 struct Microphone *mic = cls; 76 struct Microphone *mic = cls;
77 const struct AudioMessage *am;
77 78
78 if (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO) 79 if (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO)
79 { 80 {
80 GNUNET_break (0); 81 GNUNET_break (0);
81 return GNUNET_SYSERR; 82 return GNUNET_SYSERR;
82 } 83 }
83 // FIXME: unbox here, instead of sending with overhead! 84 am = (const struct AudioMessage *) msg;
84 // (see speaker.c::play)
85 mic->rdc (mic->rdc_cls, 85 mic->rdc (mic->rdc_cls,
86 ntohs (msg->size), 86 ntohs (msg->size) - sizeof (struct AudioMessage),
87 (const char *) msg); 87 &am[1]);
88 return GNUNET_OK; 88 return GNUNET_OK;
89} 89}
90 90