summaryrefslogtreecommitdiff
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)
-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,
const struct GNUNET_MessageHeader *msg)
{
struct Microphone *mic = cls;
+ const struct AudioMessage *am;
if (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO)
{
GNUNET_break (0);
return GNUNET_SYSERR;
}
- // FIXME: unbox here, instead of sending with overhead!
- // (see speaker.c::play)
+ am = (const struct AudioMessage *) msg;
mic->rdc (mic->rdc_cls,
- ntohs (msg->size),
- (const char *) msg);
+ ntohs (msg->size) - sizeof (struct AudioMessage),
+ &am[1]);
return GNUNET_OK;
}