X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=chan_lcr.c;h=25515d03b6109042f6bf910452b45ec7189beac7;hp=634c08b84644e8167483d712b5e16c94b6b73456;hb=108a0eb48201fe46572ecf565183e2c19959b5ec;hpb=1732b615a146a79d651b0f15d0e7c15334d5bece diff --git a/chan_lcr.c b/chan_lcr.c index 634c08b..25515d0 100644 --- a/chan_lcr.c +++ b/chan_lcr.c @@ -247,9 +247,7 @@ void chan_lcr_log(int type, const char *file, int line, const char *function, st ast_text[sizeof(ast_text)-1] = '\0'; // ast_log(type, file, line, function, "[call=%s ast=%s] %s", call_text, ast_text, buffer); -#if 0 printf("[call=%s ast=%s] %s", call_text, ast_text, buffer); -#endif ast_mutex_unlock(&log_lock); } @@ -883,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]) @@ -2196,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;