Revision 18943780 plugins/janus_videocall.c

View differences:

plugins/janus_videocall.c
672 672
			return;
673 673
		if(buf == NULL || len <= 0)
674 674
			return;
675
		char text[1<<16];
676
		memset(text, 0, 1<<16);
675
		char *text = g_malloc0(len+1);
677 676
		memcpy(text, buf, len);
678
		text[len] = '\0';
677
		*(text+len) = '\0';
679 678
		JANUS_LOG(LOG_VERB, "Got a DataChannel message (%zu bytes) to forward: %s\n", strlen(text), text);
680 679
		gateway->relay_data(session->peer->handle, text, strlen(text));
680
		g_free(text);
681 681
	}
682 682
}
683 683

  

Also available in: Unified diff