diff options
author | Andrey Gusakov <adnrey.gusakov@cogentembedded.com> | 2014-08-15 09:47:33 +0400 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-09-03 08:44:40 +0200 |
commit | 5fc9133a602de453030a67146c24cce5db8e3314 (patch) | |
tree | 8878f8db060e7a4da08fbb7e457181d7102a7219 /src/ctl/ctl-sink.c | |
parent | 06d7dce2ecfb87c9b7ef7f2ff0e68b407edea276 (diff) |
Devices sometimes report sessions followed by ";timeout=..". Cut this off.
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Diffstat (limited to 'src/ctl/ctl-sink.c')
-rw-r--r-- | src/ctl/ctl-sink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ctl/ctl-sink.c b/src/ctl/ctl-sink.c index 8f37545..e2db835 100644 --- a/src/ctl/ctl-sink.c +++ b/src/ctl/ctl-sink.c @@ -141,7 +141,7 @@ static int sink_setup_fn(struct rtsp *bus, struct rtsp_message *m, void *data) _rtsp_message_unref_ struct rtsp_message *rep = NULL; struct ctl_sink *s = data; const char *session; - char *ns; + char *ns, *next; int r; cli_debug("INCOMING: %s\n", rtsp_message_get_raw(m)); @@ -154,6 +154,10 @@ static int sink_setup_fn(struct rtsp *bus, struct rtsp_message *m, void *data) if (!ns) return cli_ENOMEM(); + next = strchr(ns, ';'); + if (next) + *next = '\0'; + free(s->session); s->session = ns; |