[asterisk-commits] qwell: branch 10-digiumphones r368823 - in /branches/10-digiumphones: ./ apps...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jun 12 11:21:21 CDT 2012
Author: qwell
Date: Tue Jun 12 11:21:14 2012
New Revision: 368823
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=368823
Log:
Multiple revisions 368721,368739,368760,368808
........
r368721 | kmoore | 2012-06-11 09:11:14 -0500 (Mon, 11 Jun 2012) | 8 lines
Fix compilation in dev-mode
Backport a compilation fix in md5.c from trunk that only showed up in
dev-mode under certain compiler versions.
........
Merged revisions 368719 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
r368739 | kmoore | 2012-06-11 10:15:07 -0500 (Mon, 11 Jun 2012) | 10 lines
Fix coverity UNUSED_VALUE findings in core support level files
Most of these were just saving returned values without using them and
in some cases the variable being saved to could be removed as well.
(issue ASTERISK-19672)
........
Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
r368760 | rmudgett | 2012-06-11 12:08:50 -0500 (Mon, 11 Jun 2012) | 17 lines
Fix deadlock potential with ast_set_hangupsource() calls.
Calling ast_set_hangupsource() with the channel lock held can result in a
deadlock because the function also locks the bridged channel.
(issue ASTERISK-19537)
(closes issue AST-891)
Reported by: Guenther Kelleter
Tested by: Guenther Kelleter
(closes issue ASTERISK-19801)
Reported by: Alec Davis
........
Merged revisions 368759 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
r368808 | mmichelson | 2012-06-12 10:37:38 -0500 (Tue, 12 Jun 2012) | 15 lines
Set the Caller ID "tag" on peers even if remote party information is present.
On incoming calls, we were setting the cid_tag on the dialog only if there was
no remote party information (Remote-Party-ID or P-Asserted-Identity) present.
The Caller ID tag is an invented parameter, though, and should be set no matter
the circumstance.
(closes issue ASTERISK-19859)
Reported by Thomas Arimont
(closes issue AST-884)
Reported by Trey Blancher
........
Merged revisions 368807 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 368721,368739,368760,368808 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
branches/10-digiumphones/ (props changed)
branches/10-digiumphones/apps/app_directory.c
branches/10-digiumphones/apps/app_queue.c
branches/10-digiumphones/apps/app_voicemail.c
branches/10-digiumphones/channels/chan_dahdi.c
branches/10-digiumphones/channels/chan_iax2.c
branches/10-digiumphones/channels/chan_sip.c
branches/10-digiumphones/channels/sig_analog.c
branches/10-digiumphones/channels/sip/dialplan_functions.c
branches/10-digiumphones/channels/sip/reqresp_parser.c
branches/10-digiumphones/channels/sip/sdp_crypto.c
branches/10-digiumphones/funcs/func_strings.c
branches/10-digiumphones/include/asterisk/channel.h
branches/10-digiumphones/main/channel.c
branches/10-digiumphones/main/loader.c
branches/10-digiumphones/main/md5.c
branches/10-digiumphones/main/say.c
branches/10-digiumphones/main/udptl.c
branches/10-digiumphones/pbx/pbx_config.c
branches/10-digiumphones/res/res_config_odbc.c
branches/10-digiumphones/res/res_fax.c
branches/10-digiumphones/res/res_odbc.c
branches/10-digiumphones/res/res_speech.c
Propchange: branches/10-digiumphones/
------------------------------------------------------------------------------
--- branch-10-merged (original)
+++ branch-10-merged Tue Jun 12 11:21:14 2012
@@ -1,1 +1,1 @@
-/branches/10:1-368704
+/branches/10:1-368704,368721-368808
Modified: branches/10-digiumphones/apps/app_directory.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/apps/app_directory.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/apps/app_directory.c (original)
+++ branches/10-digiumphones/apps/app_directory.c Tue Jun 12 11:21:14 2012
@@ -475,7 +475,8 @@
const char *context = ast_variable_retrieve(rtdata, mailbox, "context");
fullname = ast_variable_retrieve(rtdata, mailbox, "fullname");
- if (ast_true((hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir")))) {
+ hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir");
+ if (ast_true(hidefromdir)) {
/* Skip hidden */
continue;
}
Modified: branches/10-digiumphones/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/apps/app_queue.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/apps/app_queue.c (original)
+++ branches/10-digiumphones/apps/app_queue.c Tue Jun 12 11:21:14 2012
@@ -2334,7 +2334,7 @@
memset(tmpbuf, 0, sizeof(tmpbuf));
for (v = queue_vars; v; v = v->next) {
/* Convert to dashes `-' from underscores `_' as the latter are more SQL friendly. */
- if ((tmp = strchr(v->name, '_'))) {
+ if (strchr(v->name, '_')) {
ast_copy_string(tmpbuf, v->name, sizeof(tmpbuf));
tmp_name = tmpbuf;
tmp = tmpbuf;
@@ -4907,10 +4907,10 @@
/* Begin Monitoring */
if (qe->parent->monfmt && *qe->parent->monfmt) {
if (!qe->parent->montype) {
- const char *monexec, *monargs;
+ const char *monexec;
ast_debug(1, "Starting Monitor as requested.\n");
ast_channel_lock(qe->chan);
- if ((monexec = pbx_builtin_getvar_helper(qe->chan, "MONITOR_EXEC")) || (monargs = pbx_builtin_getvar_helper(qe->chan, "MONITOR_EXEC_ARGS"))) {
+ if ((monexec = pbx_builtin_getvar_helper(qe->chan, "MONITOR_EXEC")) || pbx_builtin_getvar_helper(qe->chan, "MONITOR_EXEC_ARGS")) {
which = qe->chan;
monexec = monexec ? ast_strdupa(monexec) : NULL;
}
Modified: branches/10-digiumphones/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/apps/app_voicemail.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/apps/app_voicemail.c (original)
+++ branches/10-digiumphones/apps/app_voicemail.c Tue Jun 12 11:21:14 2012
@@ -1629,7 +1629,7 @@
for (category = ast_category_browse(cfg, NULL); category; category = ast_category_browse(cfg, category)) {
ast_debug(4, "users.conf: %s\n", category);
if (!strcasecmp(category, vmu->mailbox)) {
- if (!(tmp = ast_variable_retrieve(cfg, category, "vmsecret"))) {
+ if (!ast_variable_retrieve(cfg, category, "vmsecret")) {
ast_debug(3, "looks like we need to make vmsecret!\n");
var = ast_variable_new("vmsecret", newpassword, "");
} else {
Modified: branches/10-digiumphones/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/channels/chan_dahdi.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/channels/chan_dahdi.c (original)
+++ branches/10-digiumphones/channels/chan_dahdi.c Tue Jun 12 11:21:14 2012
@@ -8953,13 +8953,18 @@
f = &p->subs[idx].f;
return f;
}
+
f = dahdi_handle_event(ast);
-
- /* tell the cdr this zap device hung up */
- if (f == NULL) {
- ast_set_hangupsource(ast, ast->name, 0);
- }
-
+ if (!f) {
+ const char *name = ast_strdupa(ast->name);
+
+ /* Tell the CDR this DAHDI device hung up */
+ ast_mutex_unlock(&p->lock);
+ ast_channel_unlock(ast);
+ ast_set_hangupsource(ast, name, 0);
+ ast_channel_lock(ast);
+ ast_mutex_lock(&p->lock);
+ }
return f;
}
@@ -14459,14 +14464,13 @@
int trunkgroup;
int x, y, fd = a->fd;
int interfaceid = 0;
- char *c;
char db_chan_name[20], db_answer[5];
struct dahdi_pvt *tmp;
struct dahdi_pri *pri;
if (a->argc < 5 || a->argc > 6)
return CLI_SHOWUSAGE;
- if ((c = strchr(a->argv[4], ':'))) {
+ if (strchr(a->argv[4], ':')) {
if (sscanf(a->argv[4], "%30d:%30d", &trunkgroup, &channel) != 2)
return CLI_SHOWUSAGE;
if ((trunkgroup < 1) || (channel < 1))
Modified: branches/10-digiumphones/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/channels/chan_iax2.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/channels/chan_iax2.c (original)
+++ branches/10-digiumphones/channels/chan_iax2.c Tue Jun 12 11:21:14 2012
@@ -9993,11 +9993,20 @@
{
iax2_lock_owner(callno);
if (iaxs[callno] && iaxs[callno]->owner) {
+ struct ast_channel *owner;
+ const char *name;
+
+ owner = iaxs[callno]->owner;
if (causecode) {
- iaxs[callno]->owner->hangupcause = causecode;
- }
- ast_set_hangupsource(iaxs[callno]->owner, iaxs[callno]->owner->name, 0);
- ast_channel_unlock(iaxs[callno]->owner);
+ owner->hangupcause = causecode;
+ }
+ name = ast_strdupa(owner->name);
+ ast_channel_ref(owner);
+ ast_channel_unlock(owner);
+ ast_mutex_unlock(&iaxsl[callno]);
+ ast_set_hangupsource(owner, name, 0);
+ ast_channel_unref(owner);
+ ast_mutex_lock(&iaxsl[callno]);
}
}
Modified: branches/10-digiumphones/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/channels/chan_sip.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/channels/chan_sip.c (original)
+++ branches/10-digiumphones/channels/chan_sip.c Tue Jun 12 11:21:14 2012
@@ -14043,7 +14043,7 @@
ast_log(LOG_NOTICE, "From address missing 'sip(s):', assuming sip:\n");
}
/* Get just the username part */
- if ((c = strchr(dest, '@'))) {
+ if (strchr(dest, '@')) {
c = NULL;
} else if ((c = strchr(of, '@'))) {
*c++ = '\0';
@@ -16651,10 +16651,11 @@
}
if (!ast_strlen_zero(peer->cid_name))
ast_string_field_set(p, cid_name, peer->cid_name);
- if (!ast_strlen_zero(peer->cid_tag))
- ast_string_field_set(p, cid_tag, peer->cid_tag);
if (peer->callingpres)
p->callingpres = peer->callingpres;
+ }
+ if (!ast_strlen_zero(peer->cid_tag)) {
+ ast_string_field_set(p, cid_tag, peer->cid_tag);
}
ast_string_field_set(p, fullcontact, peer->fullcontact);
if (!ast_strlen_zero(peer->context)) {
@@ -20765,6 +20766,41 @@
}
}
+/*!
+ * \internal
+ * \brief Set hangup source and cause.
+ *
+ * \param p SIP private.
+ * \param cause Hangup cause to queue. Zero if no cause.
+ *
+ * \pre p and p->owner are locked.
+ *
+ * \return Nothing
+ */
+static void sip_queue_hangup_cause(struct sip_pvt *p, int cause)
+{
+ struct ast_channel *owner = p->owner;
+ const char *name = ast_strdupa(owner->name);
+
+ /* Cannot hold any channel/private locks when calling. */
+ ast_channel_ref(owner);
+ ast_channel_unlock(owner);
+ sip_pvt_unlock(p);
+ ast_set_hangupsource(owner, name, 0);
+ if (cause) {
+ ast_queue_hangup_with_cause(owner, cause);
+ } else {
+ ast_queue_hangup(owner);
+ }
+ ast_channel_unref(owner);
+
+ /* Relock things. */
+ owner = sip_pvt_lock_full(p);
+ if (owner) {
+ ast_channel_unref(owner);
+ }
+}
+
/*! \brief Handle SIP response to INVITE dialogue */
static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, uint32_t seqno)
{
@@ -21114,16 +21150,14 @@
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
ast_log(LOG_WARNING, "Received response: \"Forbidden\" from '%s'\n", sip_get_header(&p->initreq, "From"));
if (!req->ignore && p->owner) {
- ast_set_hangupsource(p->owner, p->owner->name, 0);
- ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
+ sip_queue_hangup_cause(p, hangup_sip2cause(resp));
}
break;
case 404: /* Not found */
xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
if (p->owner && !req->ignore) {
- ast_set_hangupsource(p->owner, p->owner->name, 0);
- ast_queue_hangup_with_cause(p->owner, hangup_sip2cause(resp));
+ sip_queue_hangup_cause(p, hangup_sip2cause(resp));
}
break;
@@ -24655,11 +24689,10 @@
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */
if (p->owner) {
- ast_set_hangupsource(p->owner, p->owner->name, 0);
- ast_queue_hangup(p->owner);
- }
- else
+ sip_queue_hangup_cause(p, 0);
+ } else {
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
+ }
if (ast_str_strlen(p->initreq.data) > 0) {
struct sip_pkt *pkt, *prev_pkt;
/* If the CANCEL we are receiving is a retransmission, and we already have scheduled
@@ -24813,8 +24846,7 @@
ast_queue_hangup_with_cause(p->owner, AST_CAUSE_PROTOCOL_ERROR);
}
} else if (p->owner) {
- ast_set_hangupsource(p->owner, p->owner->name, 0);
- ast_queue_hangup(p->owner);
+ sip_queue_hangup_cause(p, 0);
sip_scheddestroy_final(p, DEFAULT_TRANS_TIMEOUT);
ast_debug(3, "Received bye, issuing owner hangup\n");
} else {
Modified: branches/10-digiumphones/channels/sig_analog.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/channels/sig_analog.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/channels/sig_analog.c (original)
+++ branches/10-digiumphones/channels/sig_analog.c Tue Jun 12 11:21:14 2012
@@ -3623,7 +3623,18 @@
f = &p->subs[idx].f;
return f;
}
+
f = __analog_handle_event(p, ast);
+ if (!f) {
+ const char *name = ast_strdupa(ast->name);
+
+ /* Tell the CDR this DAHDI device hung up */
+ analog_unlock_private(p);
+ ast_channel_unlock(ast);
+ ast_set_hangupsource(ast, name, 0);
+ ast_channel_lock(ast);
+ analog_lock_private(p);
+ }
return f;
}
Modified: branches/10-digiumphones/channels/sip/dialplan_functions.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/channels/sip/dialplan_functions.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/channels/sip/dialplan_functions.c (original)
+++ branches/10-digiumphones/channels/sip/dialplan_functions.c Tue Jun 12 11:21:14 2012
@@ -153,9 +153,9 @@
}
if (ast_strlen_zero(args.field) || !strcasecmp(args.field, "all")) {
- char quality_buf[AST_MAX_USER_FIELD], *quality;
-
- if (!(quality = ast_rtp_instance_get_quality(rtp, AST_RTP_INSTANCE_STAT_FIELD_QUALITY, quality_buf, sizeof(quality_buf)))) {
+ char quality_buf[AST_MAX_USER_FIELD];
+
+ if (!ast_rtp_instance_get_quality(rtp, AST_RTP_INSTANCE_STAT_FIELD_QUALITY, quality_buf, sizeof(quality_buf))) {
return -1;
}
Modified: branches/10-digiumphones/channels/sip/reqresp_parser.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/channels/sip/reqresp_parser.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/channels/sip/reqresp_parser.c (original)
+++ branches/10-digiumphones/channels/sip/reqresp_parser.c Tue Jun 12 11:21:14 2012
@@ -1079,7 +1079,7 @@
}
/* Test 6, NULL input */
- if ((uri = get_in_brackets(NULL))) {
+ if (get_in_brackets(NULL)) {
ast_test_status_update(test, "Test 6, NULL input failed.\n");
res = AST_TEST_FAIL;
}
Modified: branches/10-digiumphones/channels/sip/sdp_crypto.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/channels/sip/sdp_crypto.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/channels/sip/sdp_crypto.c (original)
+++ branches/10-digiumphones/channels/sip/sdp_crypto.c Tue Jun 12 11:21:14 2012
@@ -52,9 +52,7 @@
static struct sdp_crypto *sdp_crypto_alloc(void)
{
- struct sdp_crypto *crypto;
-
- return crypto = ast_calloc(1, sizeof(*crypto));
+ return ast_calloc(1, sizeof(struct sdp_crypto));
}
void sdp_crypto_destroy(struct sdp_crypto *crypto)
Modified: branches/10-digiumphones/funcs/func_strings.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/funcs/func_strings.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/funcs/func_strings.c (original)
+++ branches/10-digiumphones/funcs/func_strings.c Tue Jun 12 11:21:14 2012
@@ -584,7 +584,6 @@
AST_APP_ARG(delimiter);
AST_APP_ARG(fieldvalue);
);
- const char *ptr;
struct ast_str *orig_list = ast_str_thread_get(&tmp_buf, 16);
const char *begin, *cur, *next;
int dlen, flen, first = 1;
@@ -624,7 +623,7 @@
}
/* If the string isn't there, just copy out the string and be done with it. */
- if (!(ptr = strstr(ast_str_buffer(orig_list), args.fieldvalue))) {
+ if (!strstr(ast_str_buffer(orig_list), args.fieldvalue)) {
if (buf) {
ast_copy_string(buf, ast_str_buffer(orig_list), len);
} else {
Modified: branches/10-digiumphones/include/asterisk/channel.h
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/include/asterisk/channel.h?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/include/asterisk/channel.h (original)
+++ branches/10-digiumphones/include/asterisk/channel.h Tue Jun 12 11:21:14 2012
@@ -1474,6 +1474,8 @@
* \param source a string describing the source of the hangup for this channel
* \param force
*
+ * \note Absolutely _NO_ channel locks should be held before calling this function.
+ *
* \since 1.8
*
* Hangupsource is generally the channel name that caused the bridge to be
Modified: branches/10-digiumphones/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/main/channel.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/main/channel.c (original)
+++ branches/10-digiumphones/main/channel.c Tue Jun 12 11:21:14 2012
@@ -2773,12 +2773,18 @@
ast_string_field_set(chan, hangupsource, source);
}
bridge = ast_bridged_channel(chan);
+ if (bridge) {
+ ast_channel_ref(bridge);
+ }
ast_channel_unlock(chan);
- if (bridge && (force || ast_strlen_zero(bridge->hangupsource))) {
+ if (bridge) {
ast_channel_lock(bridge);
- ast_string_field_set(chan, hangupsource, source);
+ if (force || ast_strlen_zero(bridge->hangupsource)) {
+ ast_string_field_set(bridge, hangupsource, source);
+ }
ast_channel_unlock(bridge);
+ ast_channel_unref(bridge);
}
}
Modified: branches/10-digiumphones/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/main/loader.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/main/loader.c (original)
+++ branches/10-digiumphones/main/loader.c Tue Jun 12 11:21:14 2012
@@ -1072,13 +1072,13 @@
if (mod->flags.running)
continue;
- order = add_to_load_order(mod->resource, &load_order, 0);
+ add_to_load_order(mod->resource, &load_order, 0);
}
#ifdef LOADABLE_MODULES
/* if we are allowed to load dynamic modules, scan the directory for
for all available modules and add them as well */
- if ((dir = opendir(ast_config_AST_MODULE_DIR))) {
+ if ((dir = opendir(ast_config_AST_MODULE_DIR))) {
while ((dirent = readdir(dir))) {
int ld = strlen(dirent->d_name);
Modified: branches/10-digiumphones/main/md5.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/main/md5.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/main/md5.c (original)
+++ branches/10-digiumphones/main/md5.c Tue Jun 12 11:21:14 2012
@@ -123,6 +123,7 @@
{
unsigned count;
unsigned char *p;
+ uint32_t *in_buf;
/* Compute number of bytes mod 64 */
count = (ctx->bits[0] >> 3) & 0x3F;
@@ -151,8 +152,9 @@
byteReverse(ctx->in, 14);
/* Append length in bits and transform */
- ((uint32_t *) ctx->in)[14] = ctx->bits[0];
- ((uint32_t *) ctx->in)[15] = ctx->bits[1];
+ in_buf = (uint32_t *) ctx->in;
+ in_buf[14] = ctx->bits[0];
+ in_buf[15] = ctx->bits[1];
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
byteReverse((unsigned char *) ctx->buf, 4);
Modified: branches/10-digiumphones/main/say.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/main/say.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/main/say.c (original)
+++ branches/10-digiumphones/main/say.c Tue Jun 12 11:21:14 2012
@@ -1913,7 +1913,7 @@
char *b = buf;
b = pl_append(b, odm->dziesiatki[m100 / 10]);
b = pl_append(b, odm->separator_dziesiatek);
- b = pl_append(b, odm->cyfry2[m100 % 10]);
+ pl_append(b, odm->cyfry2[m100 % 10]);
pl_odtworz_plik(chan, language, audiofd, ctrlfd, ints, buf);
}
}
Modified: branches/10-digiumphones/main/udptl.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/main/udptl.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/main/udptl.c (original)
+++ branches/10-digiumphones/main/udptl.c Tue Jun 12 11:21:14 2012
@@ -1358,10 +1358,10 @@
ast_log(LOG_WARNING, "Disabling UDPTL checksums is not supported on this operating system!\n");
#endif
}
- if ((s = ast_variable_retrieve(cfg, "general", "T38FaxUdpEC"))) {
+ if (ast_variable_retrieve(cfg, "general", "T38FaxUdpEC")) {
ast_log(LOG_WARNING, "T38FaxUdpEC in udptl.conf is no longer supported; use the t38pt_udptl configuration option in sip.conf instead.\n");
}
- if ((s = ast_variable_retrieve(cfg, "general", "T38FaxMaxDatagram"))) {
+ if (ast_variable_retrieve(cfg, "general", "T38FaxMaxDatagram")) {
ast_log(LOG_WARNING, "T38FaxMaxDatagram in udptl.conf is no longer supported; value is now supplied by T.38 applications.\n");
}
if ((s = ast_variable_retrieve(cfg, "general", "UDPTLFECEntries"))) {
Modified: branches/10-digiumphones/pbx/pbx_config.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/pbx/pbx_config.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/pbx/pbx_config.c (original)
+++ branches/10-digiumphones/pbx/pbx_config.c Tue Jun 12 11:21:14 2012
@@ -1481,7 +1481,7 @@
}
} else if (!strcasecmp(v->name, "exten")) {
int ipri;
- char *plus, *firstp;
+ char *plus;
char *pri, *appl, *data, *cidmatch;
if (!(stringp = tc = ast_strdup(v->value))) {
@@ -1551,7 +1551,7 @@
}
appl = S_OR(stringp, "");
/* Find the first occurrence of '(' */
- if (!(firstp = strchr(appl, '('))) {
+ if (!strchr(appl, '(')) {
/* No arguments */
data = "";
} else {
Modified: branches/10-digiumphones/res/res_config_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/res/res_config_odbc.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/res/res_config_odbc.c (original)
+++ branches/10-digiumphones/res/res_config_odbc.c Tue Jun 12 11:21:14 2012
@@ -518,7 +518,7 @@
}
va_arg(aq, const char *);
- if (tableptr && !(column = ast_odbc_find_column(tableptr, newparam))) {
+ if (tableptr && !ast_odbc_find_column(tableptr, newparam)) {
ast_log(LOG_WARNING, "Key field '%s' does not exist in table '%s@%s'. Update will fail\n", newparam, table, database);
}
@@ -587,7 +587,6 @@
SQLHSTMT stmt;
va_list ap;
struct odbc_cache_tables *tableptr = ast_odbc_find_table(ups->database, ups->table);
- struct odbc_cache_columns *column;
if (!sql) {
if (tableptr) {
@@ -619,7 +618,7 @@
while ((newparam = va_arg(ap, const char *))) {
newval = va_arg(ap, const char *);
- if ((column = ast_odbc_find_column(tableptr, newparam))) {
+ if (ast_odbc_find_column(tableptr, newparam)) {
ast_str_append(&sql, 0, "%s%s=? ", first ? "" : ", ", newparam);
SQLBindParameter(stmt, x++, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(newval), 0, (void *)newval, 0, NULL);
first = 0;
@@ -637,7 +636,7 @@
while ((newparam = va_arg(ap, const char *))) {
newval = va_arg(ap, const char *);
- if (!(column = ast_odbc_find_column(tableptr, newparam))) {
+ if (!ast_odbc_find_column(tableptr, newparam)) {
va_end(ap);
ast_log(LOG_ERROR, "One or more of the criteria columns '%s' on '%s@%s' for this update does not exist!\n", newparam, ups->table, ups->database);
ast_odbc_release_table(tableptr);
Modified: branches/10-digiumphones/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/res/res_fax.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/res/res_fax.c (original)
+++ branches/10-digiumphones/res/res_fax.c Tue Jun 12 11:21:14 2012
@@ -555,7 +555,7 @@
char *m[5], *tok, *v = (char *)value;
int i = 0, j;
- if (!(tok = strchr(v, ','))) {
+ if (!strchr(v, ',')) {
m[i++] = v;
m[i] = NULL;
} else {
Modified: branches/10-digiumphones/res/res_odbc.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/res/res_odbc.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/res/res_odbc.c (original)
+++ branches/10-digiumphones/res/res_odbc.c Tue Jun 12 11:21:14 2012
@@ -1632,7 +1632,7 @@
pbx_builtin_setvar_helper(chan, "ODBC_RESULT", "INVALID_DB");
return -1;
}
- if (!(tx = find_transaction(chan, obj, value, 0))) {
+ if (!find_transaction(chan, obj, value, 0)) {
pbx_builtin_setvar_helper(chan, "ODBC_RESULT", "FAILED_TO_CREATE");
return -1;
}
Modified: branches/10-digiumphones/res/res_speech.c
URL: http://svnview.digium.com/svn/asterisk/branches/10-digiumphones/res/res_speech.c?view=diff&rev=368823&r1=368822&r2=368823
==============================================================================
--- branches/10-digiumphones/res/res_speech.c (original)
+++ branches/10-digiumphones/res/res_speech.c Tue Jun 12 11:21:14 2012
@@ -276,7 +276,6 @@
/*! \brief Register a speech recognition engine */
int ast_speech_register(struct ast_speech_engine *engine)
{
- struct ast_speech_engine *existing_engine = NULL;
int res = 0;
/* Confirm the engine meets the minimum API requirements */
@@ -286,7 +285,7 @@
}
/* If an engine is already loaded with this name, error out */
- if ((existing_engine = find_engine(engine->name))) {
+ if (find_engine(engine->name)) {
ast_log(LOG_WARNING, "Speech recognition engine '%s' already exists.\n", engine->name);
return -1;
}
More information about the asterisk-commits
mailing list