Misc code fixes (bug #2762)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4131 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
813e9e2664
commit
237f153ae4
|
@ -1796,6 +1796,11 @@ static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
|
|||
static void destroy_zt_pvt(struct zt_pvt **pvt)
|
||||
{
|
||||
struct zt_pvt *p = *pvt;
|
||||
/* Remove channel from the list */
|
||||
if(p->prev)
|
||||
p->prev->next = p->next;
|
||||
if(p->next)
|
||||
p->next->prev = p->prev;
|
||||
ast_mutex_destroy(&p->lock);
|
||||
free(p);
|
||||
*pvt = NULL;
|
||||
|
@ -5529,7 +5534,7 @@ static int handle_init_r2_event(struct zt_pvt *i, mfcr2_event_t *e)
|
|||
Steve's code */
|
||||
/* Check for callerid, digits, etc */
|
||||
i->hasr2call = 1;
|
||||
chan = zt_new(i, AST_STATE_RING, 0, SUB_REAL, 0);
|
||||
chan = zt_new(i, AST_STATE_RING, 0, SUB_REAL, 0, 0);
|
||||
if (!chan) {
|
||||
ast_log(LOG_WARNING, "Unable to create channel for channel %d\n", i->channel);
|
||||
mfcr2_DropCall(i->r2, NULL, UC_NETWORK_CONGESTION);
|
||||
|
|
|
@ -82,10 +82,10 @@ static void *autodial(void *ignore)
|
|||
fds[0].events = POLLIN;
|
||||
poll(fds, 1, -1);
|
||||
bytes=read(fd,buf,256);
|
||||
buf[(int)bytes]=0;
|
||||
|
||||
if(bytes>0){
|
||||
int x;
|
||||
buf[(int)bytes]=0;
|
||||
ast_log(LOG_DEBUG, "WilCalu : Read Buf %s\n",buf);
|
||||
sendbufptr=sendbuf;
|
||||
for(x=0; lastbuf[x]!=0 && x<257; x++);
|
||||
|
|
|
@ -351,6 +351,7 @@ odbc_status odbc_obj_connect(odbc_obj * obj)
|
|||
if ((res != SQL_SUCCESS) && (res != SQL_SUCCESS_WITH_INFO)) {
|
||||
SQLGetDiagRec(SQL_HANDLE_DBC, obj->con, 1, stat, &err, msg, 100, &mlen);
|
||||
SQLFreeHandle(SQL_HANDLE_ENV, obj->env);
|
||||
ast_mutex_unlock(&obj->lock);
|
||||
ast_log(LOG_WARNING, "res_odbc: Error SQLConnect=%d errno=%ld %s\n", res, err, msg);
|
||||
return ODBC_FAIL;
|
||||
} else {
|
||||
|
|
Reference in New Issue