-detect tunnel creation error
[oweals/gnunet.git] / src / conversation / microphone.c
index d994db889a7c2cdea5d4a29bd201f08ea98c02f9..2c399c74d54ab1b1b56a2b88e2085837470cdb73 100644 (file)
@@ -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;
 }