[asterisk-commits] rmudgett: branch rmudgett/subaddr r224851 - /team/rmudgett/subaddr/funcs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 20 16:51:39 CDT 2009
Author: rmudgett
Date: Tue Oct 20 16:51:35 2009
New Revision: 224851
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=224851
Log:
Fix CONNECTEDLINE(subaddr) set functionality.
Modified:
team/rmudgett/subaddr/funcs/func_connectedline.c
Modified: team/rmudgett/subaddr/funcs/func_connectedline.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/subaddr/funcs/func_connectedline.c?view=diff&rev=224851&r1=224850&r2=224851
==============================================================================
--- team/rmudgett/subaddr/funcs/func_connectedline.c (original)
+++ team/rmudgett/subaddr/funcs/func_connectedline.c Tue Oct 20 16:51:35 2009
@@ -228,16 +228,14 @@
} else if (!strncasecmp("subaddr", data, 7)) { /* outbound: set calling subaddress */
/* also matches subaddr-valid, subaddr-type, subaddr-odd, subaddr */
if (!strncasecmp(data + 7 ,"-valid", 6)) { /* subaddr-valid */
- chan->connected.id.subaddress.valid = atoi(value) ? 1 : 0;
+ connected.id.subaddress.valid = atoi(value) ? 1 : 0;
} else if (!strncasecmp(data + 7 ,"-type", 5)) { /* subaddr-type */
- chan->connected.id.subaddress.type = atoi(value) ? 2 : 0;
+ connected.id.subaddress.type = atoi(value) ? 2 : 0;
} else if (!strncasecmp(data + 7 ,"-odd", 4)) { /* subaddr-odd */
- chan->connected.id.subaddress.odd_even_indicator = atoi(value) ? 1 : 0;
+ connected.id.subaddress.odd_even_indicator = atoi(value) ? 1 : 0;
} else { /* subaddr */
- if (chan->connected.id.subaddress.str) {
- ast_free(chan->connected.id.subaddress.str);
- }
- chan->connected.id.subaddress.str = ast_strdup(value);
+ connected.id.subaddress.str = ast_strdupa(value);
+ ast_trim_blanks(connected.id.subaddress.str);
}
set_it(chan, &connected);
} else {
More information about the asterisk-commits
mailing list