[asterisk-addons-commits] dcb: trunk r426 - /trunk/chan_mobile.c
SVN commits to the Asterisk addons project
asterisk-addons-commits at lists.digium.com
Sat Aug 18 20:09:08 CDT 2007
Author: dcb
Date: Sat Aug 18 20:09:07 2007
New Revision: 426
URL: http://svn.digium.com/view/asterisk-addons?view=rev&rev=426
Log:
Bring into line with trunk.
Modified:
trunk/chan_mobile.c
Modified: trunk/chan_mobile.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/chan_mobile.c?view=diff&rev=426&r1=425&r2=426
==============================================================================
--- trunk/chan_mobile.c (original)
+++ trunk/chan_mobile.c Sat Aug 18 20:09:07 2007
@@ -553,7 +553,7 @@
ast_debug(1, "Hanging up device %s.\n", pvt->id);
ast_channel_lock(ast);
- ast->fds[0] = -1;
+ ast_channel_set_fd(ast, 0, -1);
ast_channel_unlock(ast);
if (pvt->type == MBL_TYPE_HEADSET && pvt->sco_socket != -1) {
@@ -689,7 +689,7 @@
close(pvt->sco_socket);
pvt->sco_socket = -1;
ast_channel_lock(ast);
- ast->fds[0] = -1;
+ ast_channel_set_fd(ast, 0, -1);
ast_channel_unlock(ast);
}
} else {
@@ -1520,7 +1520,7 @@
case MBL_STATE_RING2:
if (strstr(buf, "AT+CKPD=")) {
ast_channel_lock(pvt->owner);
- pvt->owner->fds[0] = pvt->sco_socket;
+ ast_channel_set_fd(pvt->owner, 0, pvt->sco_socket);
ast_channel_unlock(pvt->owner);
ast_queue_control(pvt->owner, AST_CONTROL_ANSWER);
pvt->state = MBL_STATE_INCOMING;
@@ -1716,7 +1716,7 @@
pvt->sco_socket = ns;
if (pvt->owner) {
ast_channel_lock(pvt->owner);
- pvt->owner->fds[0] = ns;
+ ast_channel_set_fd(pvt->owner, 0, ns);
ast_channel_unlock(pvt->owner);
}
} else
@@ -1740,8 +1740,9 @@
struct adapter_pvt *adapter;
uint16_t vs;
char nadapters = 0;
-
- cfg = ast_config_load(MBL_CONFIG);
+ struct ast_flags config_flags = { 0 };
+
+ cfg = ast_config_load(MBL_CONFIG, config_flags);
if (!cfg)
return 0;
More information about the asterisk-addons-commits
mailing list