Idefisk
Tools
Tutorials
Reviews
VoIP Providers
Archives
AsteriskGuru Archives
Mailing List Archives
FAQ
Search
Memberlist
Usergroups
Register
Profile
Log in to check your private messages
Log in
[Asterisk-cvs] asterisk/channels chan_skinny.c,1.12,1.13
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
View previous topic
::
View next topic
Author
Message
jeremy at lists.digium.co
Guest
Posted: Sun Sep 14, 2003 3:38 pm
Post subject: [Asterisk-cvs] asterisk/channels chan_skinny.c,1.12,1.13
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv23459
Modified Files:
chan_skinny.c
Log Message:
minor code fixes
Index: chan_skinny.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_skinny.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- chan_skinny.c 14 Sep 2003 04:03:28 -0000 1.12
+++ chan_skinny.c 14 Sep 2003 15:39:22 -0000 1.13
@@ -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,11 +1639,10 @@
static int skinny_senddigit(struct ast_channel *ast, char digit)
{
-// struct skinny_subchannel *sub = ast->pvt->pvt;
- char tmp[2];
- tmp[0] = digit;
- tmp[1] = '\0';
-// transmit_notify_request(sub, tmp);
+ struct skinny_subchannel *sub = ast->pvt->pvt;
+// int tmp;
+// sprintf(tmp, "%d", digit); // not right
+// transmit_tone(sub->parent->parent->session, digit);
return -1;
}
@@ -2138,7 +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) {
@@ -2473,7 +2473,7 @@
if (gethostname(ourhost, sizeof(ourhost))) {
ast_log(LOG_WARNING, "Unable to get hostname, Skinny disabled\n");
- return 0;
+ return 1;
}
cfg = ast_load(config);
@@ -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;
}
Back to top
Display posts from previous:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year
Oldest First
Newest First
AsteriskGuru Archives Forum Index
->
Asterisk-CVS
All times are GMT
Page
1
of
1
Jump to:
Select a forum
Asterisk Mailing Lists
----------------
Asterisk-Users
Asterisk-Dev
Asterisk-CVS
Asterisk-Biz
Asterisk-Doc
Asterisk-BSD
Asterisk-Announce
Asterisk Call Centers
Asterisk-Video
Asterisk-Speech-Rec
Bristuff-Users
You
cannot
post new topics in this forum
You
cannot
reply to topics in this forum
You
cannot
edit your posts in this forum
You
cannot
delete your posts in this forum
You
cannot
vote in polls in this forum
Powered by
phpBB
© 2001, 2005 phpBB Group