projects
/
lcr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[chan_lcr] Fixed uninitialized variable in ast_read()
[lcr.git]
/
chan_lcr.c
diff --git
a/chan_lcr.c
b/chan_lcr.c
index
ebaba2a
..
110c337
100644
(file)
--- a/
chan_lcr.c
+++ b/
chan_lcr.c
@@
-246,7
+246,8
@@
void chan_lcr_log(int type, const char *file, int line, const char *function, st
strncpy(ast_text, ast->name, sizeof(ast_text)-1);
ast_text[sizeof(ast_text)-1] = '\0';
strncpy(ast_text, ast->name, sizeof(ast_text)-1);
ast_text[sizeof(ast_text)-1] = '\0';
- ast_log(type, file, line, function, "[call=%s ast=%s] %s", call_text, ast_text, buffer);
+// ast_log(type, file, line, function, "[call=%s ast=%s] %s", call_text, ast_text, buffer);
+ printf("[call=%s ast=%s] %s", call_text, ast_text, buffer);
ast_mutex_unlock(&log_lock);
}
ast_mutex_unlock(&log_lock);
}
@@
-882,6
+883,8
@@
static void lcr_in_setup(struct chan_call *call, int message_type, union paramet
strncpy(ast->context, param->setup.callerinfo.interface, AST_MAX_CONTEXT-1);
if (param->setup.callerinfo.id[0])
ast->cid.cid_num = strdup(param->setup.callerinfo.id);
strncpy(ast->context, param->setup.callerinfo.interface, AST_MAX_CONTEXT-1);
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])
if (param->setup.callerinfo.name[0])
ast->cid.cid_name = strdup(param->setup.callerinfo.name);
if (param->setup.redirinfo.id[0])
@@
-2193,7
+2196,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;
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;
ast_mutex_lock(&chan_lock);
call = ast->tech_pvt;