[asterisk-commits] mmichelson: trunk r187714 - /trunk/channels/chan_local.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 10 11:26:59 CDT 2009
Author: mmichelson
Date: Fri Apr 10 11:26:48 2009
New Revision: 187714
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=187714
Log:
ast_strdup failures aren't really failures if the original value was NULL.
Modified:
trunk/channels/chan_local.c
Modified: trunk/channels/chan_local.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_local.c?view=diff&rev=187714&r1=187713&r2=187714
==============================================================================
--- trunk/channels/chan_local.c (original)
+++ trunk/channels/chan_local.c Fri Apr 10 11:26:48 2009
@@ -566,13 +566,17 @@
* All these failure points just return -1. The individual strings will
* be cleared when we destroy the channel.
*/
- if (!(p->chan->cid.cid_rdnis = ast_strdup(p->owner->cid.cid_rdnis))) {
- return -1;
+ if (p->owner->cid.cid_rdnis) {
+ if (!(p->chan->cid.cid_rdnis = ast_strdup(p->owner->cid.cid_rdnis))) {
+ return -1;
+ }
}
ast_party_redirecting_copy(&p->chan->redirecting, &p->owner->redirecting);
- if (!(p->chan->cid.cid_dnid = ast_strdup(p->owner->cid.cid_dnid))) {
- return -1;
+ if (p->owner->cid.cid_dnid) {
+ if (!(p->chan->cid.cid_dnid = ast_strdup(p->owner->cid.cid_dnid))) {
+ return -1;
+ }
}
p->chan->cid.cid_tns = p->owner->cid.cid_tns;
More information about the asterisk-commits
mailing list