[asterisk-commits] file: trunk r38853 - /trunk/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Aug 4 11:40:47 MST 2006
Author: file
Date: Fri Aug 4 13:40:47 2006
New Revision: 38853
URL: http://svn.digium.com/view/asterisk?rev=38853&view=rev
Log:
Don't assume that a referred by URI will always exist (issue #7641 reported and fixed by AuPix)
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=38853&r1=38852&r2=38853&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Aug 4 13:40:47 2006
@@ -8306,9 +8306,13 @@
*ptr = '\0';
ast_copy_string(referdata->refer_to, refer_to, sizeof(referdata->refer_to));
- if ((ptr = strchr(referred_by_uri, ';'))) /* Remove options */
- *ptr = '\0';
- ast_copy_string(referdata->referred_by, referred_by_uri, sizeof(referdata->referred_by));
+ if (referred_by_uri) {
+ if ((ptr = strchr(referred_by_uri, ';'))) /* Remove options */
+ *ptr = '\0';
+ ast_copy_string(referdata->referred_by, referred_by_uri, sizeof(referdata->referred_by));
+ } else {
+ referdata->referred_by[0] = '\0';
+ }
/* Determine transfer context */
if (transferer->owner) /* Mimic behaviour in res_features.c */
More information about the asterisk-commits
mailing list