[asterisk-commits] branch murf/AEL2 r17129 - in /team/murf/AEL2:
apps/ channels/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Apr 3 12:20:36 MST 2006
Author: murf
Date: Mon Apr 3 14:20:31 2006
New Revision: 17129
URL: http://svn.digium.com/view/asterisk?rev=17129&view=rev
Log:
I don't know how or why this happens, as I've been religious about keeping the AEL2 branch
up to date. But the zap and iax2 channel stuff, and 7 apps files are generating diffs,
and the snvmerge isn't updating/merging them.
So, I've copied in their contents, and am committing them. I'm sure this will screw everything up
totally. Oh, well!
Modified:
team/murf/AEL2/apps/app_exec.c
team/murf/AEL2/apps/app_realtime.c
team/murf/AEL2/apps/app_transfer.c
team/murf/AEL2/apps/app_url.c
team/murf/AEL2/apps/app_verbose.c
team/murf/AEL2/apps/app_voicemail.c
team/murf/AEL2/apps/app_while.c
team/murf/AEL2/channels/chan_iax2.c
team/murf/AEL2/channels/chan_zap.c
Modified: team/murf/AEL2/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/apps/app_exec.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/apps/app_exec.c (original)
+++ team/murf/AEL2/apps/app_exec.c Mon Apr 3 14:20:31 2006
@@ -72,18 +72,12 @@
/* Check and parse arguments */
if (data) {
if ((s = ast_strdupa(data))) {
- endargs = strrchr(s, ')');
- if (endargs)
- *endargs = '\0';
- pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
- }
- if (appname) {
- app = pbx_findapp(appname);
- if (app) {
- res = pbx_exec(chan, app, args, 1);
- } else {
- ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
- res = -1;
+ appname = strsep(&s, "(");
+ if (s) {
+ endargs = strrchr(s, ')');
+ if (endargs)
+ *endargs = '\0';
+ pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
}
if (appname) {
app = pbx_findapp(appname);
Modified: team/murf/AEL2/apps/app_realtime.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/apps/app_realtime.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/apps/app_realtime.c (original)
+++ team/murf/AEL2/apps/app_realtime.c Mon Apr 3 14:20:31 2006
@@ -147,19 +147,20 @@
LOCAL_USER_ADD(u);
- family = ast_strdupa(data);
- if ((colmatch = strchr(family,'|'))) {
- crop_data(colmatch);
- if ((value = strchr(colmatch,'|'))) {
- crop_data(value);
- if ((newcol = strchr(value,'|'))) {
- crop_data(newcol);
- if ((newval = strchr(newcol,'|')))
- crop_data(newval);
+ if ((family = ast_strdupa(data))) {
+ if ((colmatch = strchr(family,'|'))) {
+ crop_data(colmatch);
+ if ((value = strchr(colmatch,'|'))) {
+ crop_data(value);
+ if ((newcol = strchr(value,'|'))) {
+ crop_data(newcol);
+ if ((newval = strchr(newcol,'|')))
+ crop_data(newval);
+ }
}
}
}
- if (!newval) {
+ if (! (family && value && colmatch && newcol && newval) ) {
ast_log(LOG_ERROR,"Invalid input: usage %s\n",UUSAGE);
res = -1;
} else {
@@ -191,16 +192,17 @@
LOCAL_USER_ADD(u);
- family = ast_strdupa(data);
- if ((colmatch = strchr(family,'|'))) {
- crop_data(colmatch);
- if ((value = strchr(colmatch,'|'))) {
- crop_data(value);
- if ((prefix = strchr(value,'|')))
- crop_data(prefix);
+ if ((family = ast_strdupa(data))) {
+ if ((colmatch = strchr(family,'|'))) {
+ crop_data(colmatch);
+ if ((value = strchr(colmatch,'|'))) {
+ crop_data(value);
+ if ((prefix = strchr(value,'|')))
+ crop_data(prefix);
+ }
}
}
- if (!value) {
+ if (! (family && value && colmatch) ) {
ast_log(LOG_ERROR,"Invalid input: usage %s\n",USAGE);
res = -1;
} else {
Modified: team/murf/AEL2/apps/app_transfer.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/apps/app_transfer.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/apps/app_transfer.c (original)
+++ team/murf/AEL2/apps/app_transfer.c Mon Apr 3 14:20:31 2006
@@ -86,7 +86,7 @@
LOCAL_USER_ADD(u);
- if (ast_strlen_zero(data)) {
+ if (ast_strlen_zero((char *)data)) {
ast_log(LOG_WARNING, "Transfer requires an argument ([Tech/]destination[|options])\n");
LOCAL_USER_REMOVE(u);
pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE");
@@ -97,8 +97,6 @@
return -1;
}
}
-
- parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
Modified: team/murf/AEL2/apps/app_url.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/apps/app_url.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/apps/app_url.c (original)
+++ team/murf/AEL2/apps/app_url.c Mon Apr 3 14:20:31 2006
@@ -97,6 +97,7 @@
return -1;
}
+ stringp=tmp;
strsep(&stringp, "|");
options = strsep(&stringp, "|");
if (options && !strcasecmp(options, "wait"))
Modified: team/murf/AEL2/apps/app_verbose.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/apps/app_verbose.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/apps/app_verbose.c (original)
+++ team/murf/AEL2/apps/app_verbose.c Mon Apr 3 14:20:31 2006
@@ -65,29 +65,34 @@
LOCAL_USER_ADD(u);
if (data) {
- char *tmp = strsep(&vtext, "|,");
if ((vtext = ast_strdupa(data))) {
- if (sscanf(tmp, "%d", &vsize) != 1) {
+ char *tmp = strsep(&vtext, "|,");
+ if (vtext) {
+ if (sscanf(tmp, "%d", &vsize) != 1) {
+ vsize = 0;
+ ast_log(LOG_WARNING, "'%s' is not a verboser number\n", vtext);
+ }
+ } else {
+ vtext = tmp;
vsize = 0;
- ast_log(LOG_WARNING, "'%s' is not a verboser number\n", vtext);
}
- }
- if (option_verbose >= vsize) {
- switch (vsize) {
- case 0:
- ast_verbose("%s\n", vtext);
- break;
- case 1:
- ast_verbose(VERBOSE_PREFIX_1 "%s\n", vtext);
- break;
- case 2:
- ast_verbose(VERBOSE_PREFIX_2 "%s\n", vtext);
- break;
- case 3:
- ast_verbose(VERBOSE_PREFIX_3 "%s\n", vtext);
- break;
- default:
- ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext);
+ if (option_verbose >= vsize) {
+ switch (vsize) {
+ case 0:
+ ast_verbose("%s\n", vtext);
+ break;
+ case 1:
+ ast_verbose(VERBOSE_PREFIX_1 "%s\n", vtext);
+ break;
+ case 2:
+ ast_verbose(VERBOSE_PREFIX_2 "%s\n", vtext);
+ break;
+ case 3:
+ ast_verbose(VERBOSE_PREFIX_3 "%s\n", vtext);
+ break;
+ default:
+ ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext);
+ }
}
}
}
Modified: team/murf/AEL2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/apps/app_voicemail.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/apps/app_voicemail.c (original)
+++ team/murf/AEL2/apps/app_voicemail.c Mon Apr 3 14:20:31 2006
@@ -3313,14 +3313,14 @@
stringp = fmt;
strsep(&stringp, "|");
- if (!ast_strlen_zero(vmu->email)) {
- int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
- char *myserveremail = serveremail;
- attach_user_voicemail = ast_test_flag(vmu, VM_ATTACH);
- if (!ast_strlen_zero(vmu->serveremail))
- myserveremail = vmu->serveremail;
- sendmail(myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, cidnum, cidname, fn, fmt, duration, attach_user_voicemail, category);
- }
+ if (!ast_strlen_zero(vmu->email)) {
+ int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
+ char *myserveremail = serveremail;
+ attach_user_voicemail = ast_test_flag(vmu, VM_ATTACH);
+ if (!ast_strlen_zero(vmu->serveremail))
+ myserveremail = vmu->serveremail;
+ sendmail(myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, cidnum, cidname, fn, fmt, duration, attach_user_voicemail, category);
+ }
if (!ast_strlen_zero(vmu->pager)) {
char *myserveremail = serveremail;
@@ -6258,11 +6258,12 @@
zonesl = z;
}
} else {
- zones = z;
- zonesl = z;
+ ast_log(LOG_WARNING, "Invalid timezone definition at line %d\n", var->lineno);
+ free(z);
}
} else {
free(z);
+ return -1;
}
} else {
return -1;
Modified: team/murf/AEL2/apps/app_while.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/apps/app_while.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/apps/app_while.c (original)
+++ team/murf/AEL2/apps/app_while.c Mon Apr 3 14:20:31 2006
@@ -238,8 +238,9 @@
snprintf(used_index, VAR_SIZE, "%d", used_index_i);
snprintf(new_index, VAR_SIZE, "%d", used_index_i + 1);
- if (!end)
- condition = ast_strdupa(data);
+ if (!end) {
+ condition = ast_strdupa((char *) data);
+ }
size = strlen(chan->context) + strlen(chan->exten) + 32;
my_name = alloca(size);
Modified: team/murf/AEL2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/channels/chan_iax2.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/channels/chan_iax2.c (original)
+++ team/murf/AEL2/channels/chan_iax2.c Mon Apr 3 14:20:31 2006
@@ -2941,10 +2941,12 @@
char *key = NULL;
family = ast_strdupa(peer->dbsecret);
- key = strchr(family, '/');
- if (key)
- *key++ = '\0';
- if (!key || ast_db_get(family, key, cai->secret, sizeof(cai->secret))) {
+ if (family) {
+ key = strchr(family, '/');
+ if (key)
+ *key++ = '\0';
+ }
+ if (!family || !key || ast_db_get(family, key, cai->secret, sizeof(cai->secret))) {
ast_log(LOG_WARNING, "Unable to retrieve database password for family/key '%s'!\n", peer->dbsecret);
if (ast_test_flag(peer, IAX_TEMPONLY))
destroy_peer(peer);
@@ -4071,8 +4073,9 @@
unsigned char digest[16];
char *tmppw, *stringp;
- stringp = ast_strdupa(iaxs[callno]->secret);
- while ((tmppw = strsep(&stringp, ";"))) {
+ tmppw = ast_strdupa(iaxs[callno]->secret);
+ stringp = tmppw;
+ while((tmppw = strsep(&stringp, ";"))) {
MD5Init(&md5);
MD5Update(&md5, (unsigned char *)iaxs[callno]->challenge, strlen(iaxs[callno]->challenge));
MD5Update(&md5, (unsigned char *)tmppw, strlen(tmppw));
@@ -5105,10 +5108,14 @@
if (!ast_strlen_zero(user->dbsecret)) {
char *family, *key=NULL;
family = ast_strdupa(user->dbsecret);
- key = strchr(family, '/');
- if (key)
- *key++ = '\0';
- if (!key || ast_db_get(family, key, iaxs[callno]->secret, sizeof(iaxs[callno]->secret))) {
+ if (family) {
+ key = strchr(family, '/');
+ if (key) {
+ *key = '\0';
+ key++;
+ }
+ }
+ if (!family || !key || ast_db_get(family, key, iaxs[callno]->secret, sizeof(iaxs[callno]->secret))) {
ast_log(LOG_WARNING, "Unable to retrieve database password for family/key '%s'!\n", user->dbsecret);
if (ast_test_flag(user, IAX_TEMPONLY)) {
destroy_user(user);
@@ -5214,8 +5221,9 @@
unsigned char digest[16];
char *tmppw, *stringp;
- stringp = ast_strdupa(p->secret);
- while ((tmppw = strsep(&stringp, ";"))) {
+ tmppw = ast_strdupa(p->secret);
+ stringp = tmppw;
+ while((tmppw = strsep(&stringp, ";"))) {
MD5Init(&md5);
MD5Update(&md5, (unsigned char *)p->challenge, strlen(p->challenge));
MD5Update(&md5, (unsigned char *)tmppw, strlen(tmppw));
@@ -5350,8 +5358,9 @@
unsigned char digest[16];
char *tmppw, *stringp;
- stringp = ast_strdupa(p->secret);
- while ((tmppw = strsep(&stringp, ";"))) {
+ tmppw = ast_strdupa(p->secret);
+ stringp = tmppw;
+ while((tmppw = strsep(&stringp, ";"))) {
MD5Init(&md5);
MD5Update(&md5, (unsigned char *)iaxs[callno]->challenge, strlen(iaxs[callno]->challenge));
MD5Update(&md5, (unsigned char *)tmppw, strlen(tmppw));
@@ -8771,7 +8780,7 @@
user->ha = ast_append_ha(v->name, v->value, user->ha);
} else if (!strcasecmp(v->name, "setvar")) {
varname = ast_strdupa(v->value);
- if ((varval = strchr(varname,'='))) {
+ if (varname && (varval = strchr(varname,'='))) {
*varval = '\0';
varval++;
if((tmpvar = ast_variable_new(varname, varval))) {
Modified: team/murf/AEL2/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/murf/AEL2/channels/chan_zap.c?rev=17129&r1=17128&r2=17129&view=diff
==============================================================================
--- team/murf/AEL2/channels/chan_zap.c (original)
+++ team/murf/AEL2/channels/chan_zap.c Mon Apr 3 14:20:31 2006
@@ -11273,8 +11273,6 @@
ast_manager_register( "ZapDNDon", 0, action_zapdndon, "Toggle Zap channel Do Not Disturb status ON" );
ast_manager_register( "ZapDNDoff", 0, action_zapdndoff, "Toggle Zap channel Do Not Disturb status OFF" );
ast_manager_register("ZapShowChannels", 0, action_zapshowchannels, "Show status zapata channels");
- ast_string_field_init(&inuse, 16);
- ast_string_field_set(&inuse, name, "GR-303InUse");
return res;
}
More information about the asterisk-commits
mailing list