[Asterisk-cvs] asterisk/apps app_dial.c,1.50,1.51
markster at lists.digium.com
markster at lists.digium.com
Thu Jan 15 14:28:29 CST 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv20633/apps
Modified Files:
app_dial.c
Log Message:
X out announce stuff (bug #760)
Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- app_dial.c 18 Dec 2003 23:42:10 -0000 1.50
+++ app_dial.c 15 Jan 2004 20:20:21 -0000 1.51
@@ -347,7 +347,6 @@
int privacy=0;
int announce=0;
int resetcdr=0;
- int cnt=0;
char numsubst[AST_MAX_EXTENSION];
char restofit[AST_MAX_EXTENSION];
char *transfer = NULL;
@@ -397,6 +396,24 @@
if (transfer) {
+ /* XXX ANNOUNCE SUPPORT */
+ if ((ann = strstr(transfer, "A("))) {
+ announce = 1;
+ strncpy(announcemsg, ann + 2, sizeof(announcemsg) - 1);
+ /* Overwrite with X's what was the announce info */
+ while(*ann && (*ann != ')'))
+ *(ann++) = 'X';
+ if (*ann)
+ *ann = 'X';
+ /* Now find the end of the privdb */
+ ann = strchr(announcemsg, ')');
+ if (ann)
+ *ann = '\0';
+ else {
+ ast_log(LOG_WARNING, "Transfer with Announce spec lacking trailing ')'\n");
+ announce = 0;
+ }
+ }
/* Extract privacy info from transfer */
if ((s = strstr(transfer, "P("))) {
privacy = 1;
@@ -411,7 +428,7 @@
if (s)
*s = '\0';
else {
- ast_log(LOG_WARNING, "Transfer with privacy lacking trailing '('\n");
+ ast_log(LOG_WARNING, "Transfer with privacy lacking trailing ')'\n");
privacy = 0;
}
} else if (strchr(transfer, 'P')) {
@@ -419,16 +436,6 @@
privacy = 1;
} else if (strchr(transfer, 'C')) {
resetcdr = 1;
- }
- /* XXX ANNOUNCE SUPPORT */
- else if ((ann = strstr(transfer, "A("))) {
- announce = 1;
- strncpy(announcemsg, ann + 2, sizeof(announcemsg) - 1);
- cnt=0;
- while(announcemsg[cnt] != ')') {
- cnt++;
- }
- announcemsg[cnt]='\0';
}
}
if (resetcdr && chan->cdr)
More information about the svn-commits
mailing list