va_end(args);
if (call)
- sprintf(call_text, "%ld", call->ref);
+ sprintf(call_text, "%d", call->ref);
if (ast)
strncpy(ast_text, ast->name, sizeof(ast_text)-1);
ast_text[sizeof(ast_text)-1] = '\0';
*/
struct chan_call *call_first;
-struct chan_call *find_call_ref(unsigned long ref)
+struct chan_call *find_call_ref(unsigned int ref)
{
struct chan_call *call = call_first;
return(call);
}
-struct chan_call *find_call_handle(unsigned long handle)
+struct chan_call *find_call_handle(unsigned int handle)
{
struct chan_call *call = call_first;
/*
* enque message to LCR
*/
-int send_message(int message_type, unsigned long ref, union parameter *param)
+int send_message(int message_type, unsigned int ref, union parameter *param)
{
struct admin_list *admin, **adminp;
}
/*
- * got dtmf from bchannel
+ * got dtmf from bchannel (locked state)
*/
void lcr_in_dtmf(struct chan_call *call, int val)
{
if (!call->pbx_started)
return;
- CDEBUG(call, call->ast, "Frowarding DTMF digit '%c' to Asterisk.\n", val);
+ CDEBUG(call, call->ast, "Forwarding DTMF digit '%c' to Asterisk.\n", val);
/* send digit to asterisk */
memset(&fr, 0, sizeof(fr));
/*
* message received from LCR
*/
-int receive_message(int message_type, unsigned long ref, union parameter *param)
+int receive_message(int message_type, unsigned int ref, union parameter *param)
{
struct bchannel *bchannel;
struct chan_call *call;
char *socket_name = SOCKET_NAME;
int conn;
struct sockaddr_un sock_address;
- unsigned long on = 1;
+ unsigned int on = 1;
union parameter param;
/* open socket */
strncpy(call->dialstring, dial, sizeof(call->dialstring)-1);
apply_opt(call, (char *)opt);
- /* if hdlc is forced by option, we change transcap to data */
- if (call->hdlc
- && ast->transfercapability != INFO_BC_DATAUNRESTRICTED
- && ast->transfercapability != INFO_BC_DATARESTRICTED
- && ast->transfercapability != INFO_BC_VIDEO)
- ast->transfercapability = INFO_BC_DATAUNRESTRICTED;
-
ast_mutex_unlock(&chan_lock);
return ast;
}
|| ast->transfercapability == INFO_BC_DATARESTRICTED
|| ast->transfercapability == INFO_BC_VIDEO)
call->hdlc = 1;
-
+ /* if hdlc is forced by option, we change transcap to data */
+ if (call->hdlc
+ && ast->transfercapability != INFO_BC_DATAUNRESTRICTED
+ && ast->transfercapability != INFO_BC_DATARESTRICTED
+ && ast->transfercapability != INFO_BC_VIDEO)
+ ast->transfercapability = INFO_BC_DATAUNRESTRICTED;
+
ast_mutex_unlock(&chan_lock);
return 0;
}