]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix the return value of gettag() to only return the pointer to the provided
authorRussell Bryant <russell@russellbryant.com>
Fri, 5 May 2006 21:43:06 +0000 (21:43 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 5 May 2006 21:43:06 +0000 (21:43 +0000)
tag buffer if the tag was actually found.  There is code that checks to see
if this result is non-zero to determine whether the tag was found or not.
(issue #7092, mikma)

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

channels/chan_sip.c

index 2d7c6cd0d2fe2431d3c06e7c06d5e6dd80124a94..c13d9a9ce0566d8ec994d20c04e6d9a1c824edd0 100644 (file)
@@ -10795,8 +10795,9 @@ static const char *gettag(const struct sip_request *req, char *header, char *tag
                sep = strchr(tagbuf, ';');
                if (sep)
                        *sep = '\0';
+               return tagbuf;
        }
-       return tagbuf;
+       return NULL;
 }
 
 /*! \brief Handle incoming notifications */