Revision 18943780 sctp.c

View differences:

sctp.c
1310 1310
	JANUS_LOG(LOG_INFO, "[%"SCNu64"] Leaving SCTP association thread\n", sctp->handle_id);
1311 1311
	/* This association has been destroyed, wait a bit and then free all the resources */
1312 1312
	g_usleep (1*G_USEC_PER_SEC);
1313
	g_queue_free(sctp->in_messages);
1313
	GQueue *tmp = sctp->in_messages;
1314 1314
	sctp->in_messages = NULL;
1315
	g_queue_free(sctp->out_messages);
1315
	while(!g_queue_is_empty(tmp)) {
1316
		message = g_queue_pop_head(tmp);
1317
		janus_sctp_message_destroy(message);
1318
	}
1319
	g_queue_free(tmp);
1320
	tmp = sctp->out_messages;
1316 1321
	sctp->out_messages = NULL;
1322
	while(!g_queue_is_empty(tmp)) {
1323
		message = g_queue_pop_head(tmp);
1324
		janus_sctp_message_destroy(message);
1325
	}
1326
	g_queue_free(tmp);
1317 1327
	sctp->thread = NULL;
1318 1328
#ifdef DEBUG_SCTP
1319 1329
	if(sctp->debug_dump != NULL)

Also available in: Unified diff