Import of rev 13026 from 1.2 branch: Fix parameters to event: header
authorOlle Johansson <oej@edvina.net>
Wed, 15 Mar 2006 13:06:48 +0000 (13:06 +0000)
committerOlle Johansson <oej@edvina.net>
Wed, 15 Mar 2006 13:06:48 +0000 (13:06 +0000)
in SUBSCRIBE request

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13027 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 27bf027..426fb93 100644 (file)
@@ -10848,10 +10848,18 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
                char mailboxbuf[256]="";
                char *mailbox = NULL;
                int mailboxsize = 0;
+               char *eventparam;
 
                char *event = get_header(req, "Event"); /* Get Event package name */
                char *accept = get_header(req, "Accept");
 
+               /* Find parameters to Event: header value and remove them for now */
+               eventparam = strchr(event, ";");
+               if (eventparam) {
+                       *eventparam = '\0';
+                       eventparam++;
+               }
+
                if (!strcmp(event, "message-summary") && !strcmp(accept, "application/simple-message-summary")) {
                        mailbox = mailboxbuf;
                        mailboxsize = sizeof(mailboxbuf);