mgcp/sdp: Session name must not be empty pick an empty one
The session name must be present in a SDP file. The RFC proposes to use a space for it but the other equipment is using the dash so I have picked that as well. RFC 4566: The "s=" field is the textual session name. There MUST be one and only one "s=" field per session description. The "s=" field MUST NOT be empty and SHOULD contain ISO 10646 characters (but see also the "a=charset" attribute). If a session has no meaningful name, the alue "s= " SHOULD be used (i.e., a single space as the session name). Fixes: RT#2196
This commit is contained in:
parent
619b014d3a
commit
b1edf7b64f
|
@ -258,6 +258,7 @@ static int write_response_sdp(struct mgcp_endpoint *endp,
|
|||
len = snprintf(sdp_record, size,
|
||||
"v=0\r\n"
|
||||
"o=- %u 23 IN IP4 %s\r\n"
|
||||
"s=-\r\n"
|
||||
"c=IN IP4 %s\r\n"
|
||||
"t=0 0\r\n",
|
||||
endp->ci, addr, addr);
|
||||
|
|
|
@ -84,6 +84,7 @@ static void test_strline(void)
|
|||
"\n" \
|
||||
"v=0\r\n" \
|
||||
"o=- 1 23 IN IP4 0.0.0.0\r\n" \
|
||||
"s=-\r\n" \
|
||||
"c=IN IP4 0.0.0.0\r\n" \
|
||||
"t=0 0\r\n" \
|
||||
"m=audio 0 RTP/AVP 126\r\n" \
|
||||
|
@ -94,6 +95,7 @@ static void test_strline(void)
|
|||
"\n" \
|
||||
"v=0\r\n" \
|
||||
"o=- 3 23 IN IP4 0.0.0.0\r\n" \
|
||||
"s=-\r\n" \
|
||||
"c=IN IP4 0.0.0.0\r\n" \
|
||||
"t=0 0\r\n" \
|
||||
"m=audio 0 RTP/AVP 126\r\n" \
|
||||
|
@ -118,6 +120,7 @@ static void test_strline(void)
|
|||
"\n" \
|
||||
"v=0\r\n" \
|
||||
"o=- 1 23 IN IP4 0.0.0.0\r\n" \
|
||||
"s=-\r\n" \
|
||||
"c=IN IP4 0.0.0.0\r\n" \
|
||||
"t=0 0\r\n" \
|
||||
"m=audio 0 RTP/AVP 126\r\n" \
|
||||
|
@ -209,6 +212,7 @@ static void test_strline(void)
|
|||
"\n" \
|
||||
"v=0\r\n" \
|
||||
"o=- 1 23 IN IP4 0.0.0.0\r\n" \
|
||||
"s=-\r\n" \
|
||||
"c=IN IP4 0.0.0.0\r\n" \
|
||||
"t=0 0\r\n" \
|
||||
"m=audio 0 RTP/AVP 126\r\n" \
|
||||
|
@ -220,6 +224,7 @@ static void test_strline(void)
|
|||
"\n" \
|
||||
"v=0\r\n" \
|
||||
"o=- 1 23 IN IP4 0.0.0.0\r\n" \
|
||||
"s=-\r\n" \
|
||||
"c=IN IP4 0.0.0.0\r\n" \
|
||||
"t=0 0\r\n" \
|
||||
"m=audio 0 RTP/AVP 126\r\n" \
|
||||
|
@ -230,6 +235,7 @@ static void test_strline(void)
|
|||
"\n" \
|
||||
"v=0\r\n" \
|
||||
"o=- 3 23 IN IP4 0.0.0.0\r\n" \
|
||||
"s=-\r\n" \
|
||||
"c=IN IP4 0.0.0.0\r\n" \
|
||||
"t=0 0\r\n" \
|
||||
"m=audio 0 RTP/AVP 126\r\n" \
|
||||
|
@ -250,6 +256,7 @@ static void test_strline(void)
|
|||
"\n" \
|
||||
"v=0\r\n" \
|
||||
"o=- 2 23 IN IP4 0.0.0.0\r\n" \
|
||||
"s=-\r\n" \
|
||||
"c=IN IP4 0.0.0.0\r\n" \
|
||||
"t=0 0\r\n" \
|
||||
"m=audio 0 RTP/AVP 126\r\n" \
|
||||
|
|
Loading…
Reference in New Issue