[asterisk-commits] dvossel: branch 1.6.1 r201601 - in /branches/1.6.1: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 18 10:24:55 CDT 2009
Author: dvossel
Date: Thu Jun 18 10:24:40 2009
New Revision: 201601
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=201601
Log:
Merged revisions 201570 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r201570 | dvossel | 2009-06-18 10:16:05 -0500 (Thu, 18 Jun 2009) | 11 lines
parsing extension correctly from sip register lines
If a transport type was specified, but no extension, parsing of the extension would return whatever was after the transport rather than defaulting to 's'.
(closes issue #15111)
Reported by: ffs
Patches:
chan_sip.c_register-parser.patch uploaded by ffs (license 730)
Tested by: ffs, dvossel
........
Modified:
branches/1.6.1/ (props changed)
branches/1.6.1/channels/chan_sip.c
Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.1/channels/chan_sip.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/channels/chan_sip.c?view=diff&rev=201601&r1=201600&r2=201601
==============================================================================
--- branches/1.6.1/channels/chan_sip.c (original)
+++ branches/1.6.1/channels/chan_sip.c Thu Jun 18 10:24:40 2009
@@ -6623,19 +6623,20 @@
enum sip_transport transport = SIP_TRANSPORT_UDP;
char buf[256] = "";
char *username = NULL;
- char *hostname=NULL, *secret=NULL, *authuser=NULL, *expire=NULL;
+ char *hostname=NULL, *secret=NULL, *authuser=NULL, *expire=NULL, *buf2=NULL;
char *callback=NULL;
if (!value)
return -1;
ast_copy_string(buf, value, sizeof(buf));
-
- /* split [/contact][~expiry] */
- expire = strchr(buf, '~');
+ buf2 = strrchr(buf, '@');
+
+ /* split [/extension][~expiry] */
+ expire = strchr(buf2, '~');
if (expire)
*expire++ = '\0';
- callback = strrchr(buf, '/');
+ callback = strrchr(buf2, '/');
if (callback)
*callback++ = '\0';
if (ast_strlen_zero(callback))
More information about the asterisk-commits
mailing list