summaryrefslogtreecommitdiffstats
path: root/chan_lcr.c
diff options
context:
space:
mode:
authorAndreas Eversberg2010-10-07 09:55:23 +0200
committerAndreas Eversberg2010-10-30 17:24:20 +0200
commit8a041720cbacf564cde530aca377c5e059f44630 (patch)
tree63b3189f8ad5820475e8fb3014c62485014ec821 /chan_lcr.c
parent[chan_lcr] Fixed uninitialized variable in ast_read() (diff)
downloadlcr-8a041720cbacf564cde530aca377c5e059f44630.tar.gz
lcr-8a041720cbacf564cde530aca377c5e059f44630.tar.xz
lcr-8a041720cbacf564cde530aca377c5e059f44630.zip
[chan_lcr] Fixed caller ID by clearing ast->cid first
Tests with asterisk 1.6.2.13 showed that callerid did not work unless the ast->cid structure is set to zero. Thanx for Marcello for prividing this fix.
Diffstat (limited to 'chan_lcr.c')
-rw-r--r--chan_lcr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/chan_lcr.c b/chan_lcr.c
index 110c337..25515d0 100644
--- a/chan_lcr.c
+++ b/chan_lcr.c
@@ -881,6 +881,7 @@ static void lcr_in_setup(struct chan_call *call, int message_type, union paramet
strncpy(ast->context, param->setup.context, AST_MAX_CONTEXT-1);
else
strncpy(ast->context, param->setup.callerinfo.interface, AST_MAX_CONTEXT-1);
+ memset(&ast->cid, 0, sizeof(ast->cid));
if (param->setup.callerinfo.id[0])
ast->cid.cid_num = strdup(param->setup.callerinfo.id);
if (param->setup.callerinfo.id2[0])