aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-11-20 23:17:32 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-11-20 23:17:32 +0100
commitb1edf7b64f6c05932c83b4d31b1127f2a833601e (patch)
tree8bd309552737df6a3ed5755bd143a170e1113fa6 /openbsc/src/libmgcp
parent619b014d3aacea1b33b70432af01e80eb2252af0 (diff)
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
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 98452ce04..5df357776 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -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);