[asterisk-commits] qwell: branch 1.4 r56569 - /branches/1.4/channels/chan_skinny.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 23 19:02:54 MST 2007


Author: qwell
Date: Fri Feb 23 20:02:53 2007
New Revision: 56569

URL: http://svn.digium.com/view/asterisk?view=rev&rev=56569
Log:
Make sure to set a speeddials parent on creation.
Don't crash if hold is pressed when no call is active.
Don't return in places that we shouldn't..

Modified:
    branches/1.4/channels/chan_skinny.c

Modified: branches/1.4/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_skinny.c?view=diff&rev=56569&r1=56568&r2=56569
==============================================================================
--- branches/1.4/channels/chan_skinny.c (original)
+++ branches/1.4/channels/chan_skinny.c Fri Feb 23 20:02:53 2007
@@ -2108,6 +2108,8 @@
 						ast_copy_string(sd->label, exten, sizeof(sd->label));
 					sd->instance = speeddialInstance++;
 
+					sd->parent = d;
+
 					sd->next = d->speeddials;
 					d->speeddials = sd;
 				}
@@ -2464,6 +2466,7 @@
 	   or you won't get keypad messages in some situations. */
 	transmit_callinfo(s, ast->cid.cid_name, ast->cid.cid_num, ast->exten, ast->exten, l->instance, sub->callid, 2);
 	transmit_callstate(s, l->instance, SKINNY_CONNECTED, sub->callid);
+	transmit_selectsoftkeys(s, l->instance, sub->callid, KEYDEF_CONNECTED);
 	transmit_displaypromptstatus(s, "Connected", 0, l->instance, sub->callid);
 	return res;
 }
@@ -3083,6 +3086,9 @@
 		if (skinnydebug)
 			ast_verbose("Received Stimulus: Hold(%d)\n", instance);
 
+		if (!sub)
+			break;
+
 		if (sub->onhold) {
 			skinny_unhold(sub);
 		} else {
@@ -3752,7 +3758,7 @@
 
 			if (ast_strlen_zero(l->lastnumberdialed)) {
 				ast_log(LOG_WARNING, "Attempted redial, but no previously dialed number found.\n");
-				return 0;
+				break;
 			}
 			if (!ast_ignore_pattern(c->context, l->lastnumberdialed)) {
 				transmit_tone(s, SKINNY_SILENCE);
@@ -3871,7 +3877,7 @@
 					}
 				} else if (res) {
 					ast_log(LOG_WARNING, "Transfer attempt failed\n");
-					return 0;
+					break;
 				}
 #endif
 			} else {



More information about the asterisk-commits mailing list