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