X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=chan_lcr.c;h=25515d03b6109042f6bf910452b45ec7189beac7;hp=edf38a7ced2247104ca3d4983a64b5a60bb30c9f;hb=108a0eb48201fe46572ecf565183e2c19959b5ec;hpb=db5c235146985544e856bb1106a4b78507c892cf diff --git a/chan_lcr.c b/chan_lcr.c index edf38a7..25515d0 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -881,8 +881,11 @@ 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]) + ast->cid.cid_ani = strdup(param->setup.callerinfo.id2); if (param->setup.callerinfo.name[0]) ast->cid.cid_name = strdup(param->setup.callerinfo.name); if (param->setup.redirinfo.id[0]) @@ -2194,7 +2197,7 @@ static int lcr_write(struct ast_channel *ast, struct ast_frame *f) static struct ast_frame *lcr_read(struct ast_channel *ast) { struct chan_call *call; - int len; + int len = 0; ast_mutex_lock(&chan_lock); call = ast->tech_pvt;