[Asterisk-cvs] asterisk/apps app_dial.c,1.154,1.155
markster at lists.digium.com
markster at lists.digium.com
Thu Jun 2 13:09:01 CDT 2005
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv1976/apps
Modified Files:
app_dial.c
Log Message:
Fix dial to not seg when closing ')' is missing (bug #4410)
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- app_dial.c 1 Jun 2005 18:02:46 -0000 1.154
+++ app_dial.c 2 Jun 2005 17:12:04 -0000 1.155
@@ -820,19 +820,19 @@
dblgoto = ast_strdupa(mac + 2);
while (*mac && (*mac != ')'))
*(mac++) = 'X';
- if (*mac)
+ if (*mac) {
*mac = 'X';
- else {
+ mac = strchr(dblgoto, ')');
+ if (mac)
+ *mac = '\0';
+ else {
+ ast_log(LOG_WARNING, "Goto flag set without trailing ')'\n");
+ dblgoto = NULL;
+ }
+ } else {
ast_log(LOG_WARNING, "Could not find exten to which we should jump.\n");
dblgoto = NULL;
}
- mac = strchr(dblgoto, ')');
- if (mac)
- *mac = '\0';
- else {
- ast_log(LOG_WARNING, "Goto flag set without trailing ')'\n");
- dblgoto = NULL;
- }
}
/* Get the macroname from the dial option string */
@@ -841,19 +841,19 @@
macroname = ast_strdupa(mac + 2);
while (*mac && (*mac != ')'))
*(mac++) = 'X';
- if (*mac)
+ if (*mac) {
*mac = 'X';
- else {
+ mac = strchr(macroname, ')');
+ if (mac)
+ *mac = '\0';
+ else {
+ ast_log(LOG_WARNING, "Macro flag set without trailing ')'\n");
+ hasmacro = 0;
+ }
+ } else {
ast_log(LOG_WARNING, "Could not find macro to which we should jump.\n");
hasmacro = 0;
}
- mac = strchr(macroname, ')');
- if (mac)
- *mac = '\0';
- else {
- ast_log(LOG_WARNING, "Macro flag set without trailing ')'\n");
- hasmacro = 0;
- }
}
/* Get music on hold class */
if ((mac = strstr(transfer, "m("))) {
@@ -898,8 +898,8 @@
} else if (strchr(transfer, 'C')) {
resetcdr = 1;
} else if (strchr(transfer, 'n')) {
- nojump = 1;
- }
+ nojump = 1;
+ }
}
if (resetcdr && chan->cdr)
ast_cdr_reset(chan->cdr, 0);
More information about the svn-commits
mailing list