[Asterisk-cvs] asterisk/channels chan_skinny.c,1.14,1.15
jeremy at lists.digium.com
jeremy at lists.digium.com
Fri Sep 26 20:04:44 CDT 2003
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv18849
Modified Files:
chan_skinny.c
Log Message:
anonyance fixes, per tholo :)
Index: chan_skinny.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_skinny.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- chan_skinny.c 14 Sep 2003 15:42:27 -0000 1.14
+++ chan_skinny.c 27 Sep 2003 01:05:55 -0000 1.15
@@ -1426,16 +1426,16 @@
struct skinny_line *l;
struct skinny_subchannel *sub;
struct skinnysession *session;
-
- sub = ast->pvt->pvt;
- l = sub->parent;
- session = l->parent->session;
+
+ sub = ast->pvt->pvt;
+ l = sub->parent;
+ session = l->parent->session;
- if (!l->parent->registered) {
- ast_log(LOG_ERROR, "Device not registered, cannot call %s\n", dest);
- return -1;
- }
-
+ if (!l->parent->registered) {
+ ast_log(LOG_ERROR, "Device not registered, cannot call %s\n", dest);
+ return -1;
+ }
+
if ((ast->_state != AST_STATE_DOWN) && (ast->_state != AST_STATE_RESERVED)) {
ast_log(LOG_WARNING, "skinny_call called on %s, neither down nor reserved\n", ast->name);
return -1;
@@ -1512,25 +1512,25 @@
struct skinny_line *l = sub->parent;
struct skinnysession *s = l->parent->session;
- if (skinnydebug) {
- ast_verbose("skinny_hangup(%s) on %s@%s\n", ast->name, l->name, l->parent->name);
- }
- if (!ast->pvt->pvt) {
- ast_log(LOG_DEBUG, "Asked to hangup channel not connected\n");
- return 0;
- }
-
- if (l->parent->registered) {
+ if (skinnydebug) {
+ ast_verbose("skinny_hangup(%s) on %s@%s\n", ast->name, l->name, l->parent->name);
+ }
+ if (!ast->pvt->pvt) {
+ ast_log(LOG_DEBUG, "Asked to hangup channel not connected\n");
+ return 0;
+ }
+
+ if (l->parent->registered) {
if ((sub->parent->type = TYPE_LINE) && (sub->parent->hookstate == SKINNY_OFFHOOK)) {
sub->parent->hookstate = SKINNY_ONHOOK;
transmit_callstate(s, l->instance, SKINNY_ONHOOK, sub->callid);
transmit_speaker_mode(s, SKINNY_SPEAKEROFF);
- } else if ((sub->parent->type = TYPE_LINE) && (sub->parent->hookstate == SKINNY_ONHOOK)) {
- transmit_callstate(s, l->instance, SKINNY_ONHOOK, sub->callid);
- transmit_speaker_mode(s, SKINNY_SPEAKEROFF);
- transmit_ringer_mode(s, SKINNY_RING_OFF);
- transmit_tone(s, SKINNY_SILENCE);
- }
+ } else if ((sub->parent->type = TYPE_LINE) && (sub->parent->hookstate == SKINNY_ONHOOK)) {
+ transmit_callstate(s, l->instance, SKINNY_ONHOOK, sub->callid);
+ transmit_speaker_mode(s, SKINNY_SPEAKEROFF);
+ transmit_ringer_mode(s, SKINNY_RING_OFF);
+ transmit_tone(s, SKINNY_SILENCE);
+ }
}
ast_mutex_lock(&sub->lock);
sub->owner = NULL;
@@ -1639,9 +1639,9 @@
static int skinny_senddigit(struct ast_channel *ast, char digit)
{
- struct skinny_subchannel *sub = ast->pvt->pvt;
-// int tmp;
-// sprintf(tmp, "%d", digit); // not right
+// struct skinny_subchannel *sub = ast->pvt->pvt;
+// int tmp;
+// sprintf(tmp, "%d", digit); // not right
// transmit_tone(sub->parent->parent->session, digit);
return -1;
}
@@ -2137,8 +2137,8 @@
sprintf(&d, "%d", digit);
}
f.subclass = d;
- f.src = "skinny";
-
+ f.src = "skinny";
+
sub = find_subchannel_by_line(s->device->lines);
if (sub->owner) {
@@ -2636,13 +2636,13 @@
int reload(void)
{
-#if 0
-// XXX Causes Seg
-
+#if 0
+// XXX Causes Seg
+
delete_devices();
reload_config();
restart_monitor();
-#endif
+#endif
return 0;
}
More information about the svn-commits
mailing list