From a992164529806da98027adb9710dabd86e68520e Mon Sep 17 00:00:00 2001 From: Michiel van Baak Date: Fri, 23 Jan 2009 16:57:07 +0000 Subject: 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: https://origsvn.digium.com/svn/asterisk/trunk@170460 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_skinny.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'channels') 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); } } -- cgit v1.2.3