Revision 5de69b28 sdp-utils.c

View differences:

sdp-utils.c
100 100
		return NULL;
101 101
	janus_sdp_attribute *a = g_malloc0(sizeof(janus_sdp_attribute));
102 102
	a->name = g_strdup(name);
103
	a->direction = JANUS_SDP_DEFAULT;
103 104
	if(value) {
104 105
		char buffer[512];
105 106
		va_list ap;
......
308 309
							*semicolon = '\0';
309 310
							a->name = g_strdup(line);
310 311
							a->value = g_strdup(semicolon+1);
312
							a->direction = JANUS_SDP_DEFAULT;
311 313
							*semicolon = ':';
314
							if(strstr(line, "/sendonly"))
315
								a->direction = JANUS_SDP_SENDONLY;
316
							else if(strstr(line, "/recvonly"))
317
								a->direction = JANUS_SDP_RECVONLY;
318
							if(strstr(line, "/inactive"))
319
								a->direction = JANUS_SDP_INACTIVE;
312 320
						}
313 321
						imported->attributes = g_list_append(imported->attributes, a);
314 322
						break;
......
433 441
							*semicolon = '\0';
434 442
							a->name = g_strdup(line);
435 443
							a->value = g_strdup(semicolon+1);
444
							a->direction = JANUS_SDP_DEFAULT;
436 445
							*semicolon = ':';
446
							if(strstr(line, "/sendonly"))
447
								a->direction = JANUS_SDP_SENDONLY;
448
							else if(strstr(line, "/recvonly"))
449
								a->direction = JANUS_SDP_RECVONLY;
450
							if(strstr(line, "/inactive"))
451
								a->direction = JANUS_SDP_INACTIVE;
437 452
						}
438 453
						mline->attributes = g_list_append(mline->attributes, a);
439 454
						break;

Also available in: Unified diff