aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
authormvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-23 16:57:07 +0000
committermvanbaak <mvanbaak@f38db490-d61c-443f-a65b-d21fe96a405b>2009-01-23 16:57:07 +0000
commit65f580763412fa700a0db93724883136b06fb8e7 (patch)
tree628cf7ca12fed176510ad87cd20ec376e441d7c3 /channels/chan_skinny.c
parentda43cbfde5e723172d83d04b8deb7ca00cc893c7 (diff)
Dont clear the display of skinny phones when not needed.
(closes issue #13182) Reported by: pj Patches: 2009011901_dontcleardisplay.diff.txt uploaded by mvanbaak (license 7) Tested by: mvanbaak, pj git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170460 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r--channels/chan_skinny.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index 9051cafa3..cacc776b0 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2243,6 +2243,9 @@ static void transmit_displaymessage(struct skinny_device *d, const char *text, i
//req->data.clearpromptstatus.lineInstance = instance;
//req->data.clearpromptstatus.callReference = reference;
+ /* send datetime message. We have to do it here because it will clear the display on the phone if we do it elsewhere */
+ handle_time_date_req_message(NULL, d->session);
+
if (skinnydebug)
ast_verb(1, "Clearing Display\n");
} else {
@@ -2542,12 +2545,6 @@ static void mwi_event_cb(const struct ast_event *event, void *userdata)
}
}
-static void do_housekeeping(struct skinnysession *s)
-{
- /* Update time on device */
- handle_time_date_req_message(NULL, s);
-}
-
/* I do not believe skinny can deal with video.
Anyone know differently? */
/* Yes, it can. Currently 7985 and Cisco VT Advantage do video. */
@@ -3492,6 +3489,7 @@ static int skinny_hangup(struct ast_channel *ast)
transmit_stopmediatransmission(d, sub);
transmit_speaker_mode(d, SKINNY_SPEAKEROFF);
transmit_ringer_mode(d, SKINNY_RING_OFF);
+ transmit_displaymessage(d, NULL, l->instance, sub->callid); /* clear display */
transmit_tone(d, SKINNY_SILENCE, l->instance, sub->callid);
/* we should check to see if we can start the ringer if another line is ringing */
}
@@ -4155,7 +4153,6 @@ static int handle_keep_alive_message(struct skinny_req *req, struct skinnysessio
return -1;
transmit_response(s->device, req);
- do_housekeeping(s);
return 1;
}
@@ -4846,10 +4843,6 @@ static int handle_onhook_message(struct skinny_req *req, struct skinnysession *s
l->name, d->name, sub->callid);
}
}
- /* The bit commented below gives a very occasional core dump. */
- if ((l->hookstate == SKINNY_ONHOOK) && (AST_LIST_NEXT(sub, list) /*&& !AST_LIST_NEXT(sub, list)->rtp*/)) {
- do_housekeeping(s);
- }
return 1;
}
@@ -5568,7 +5561,6 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
}
}
if ((l->hookstate == SKINNY_ONHOOK) && (AST_LIST_NEXT(sub, list) && !AST_LIST_NEXT(sub, list)->rtp)) {
- do_housekeeping(s);
ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s@%s", l->name, d->name);
}
}