[asterisk-commits] mvanbaak: trunk r170460 - /trunk/channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 23 10:57:08 CST 2009


Author: mvanbaak
Date: Fri Jan 23 10:57:07 2009
New Revision: 170460

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=170460
Log:
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

Modified:
    trunk/channels/chan_skinny.c

Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=170460&r1=170459&r2=170460
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Fri Jan 23 10:57:07 2009
@@ -2243,6 +2243,9 @@
 		//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 {
@@ -2540,12 +2543,6 @@
 		}
 		ast_verb(3, "Skinny mwi_event_cb found %d new messages\n", new_msgs);
 	}
-}
-
-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.
@@ -3492,6 +3489,7 @@
 				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 @@
 		return -1;
 
 	transmit_response(s->device, req);
-	do_housekeeping(s);
 	return 1;
 }
 
@@ -4845,10 +4842,6 @@
 			ast_log(LOG_WARNING, "Skinny(%s@%s-%d) channel already destroyed\n",
 				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 @@
 				}
 			}
 			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);
 			}
 		}




More information about the asterisk-commits mailing list