aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_skinny.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-24 02:02:53 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-24 02:02:53 +0000
commitee4a195ba6448c2790dfc863a0dc633066d98481 (patch)
tree7c5e5349d1c27b7b6edbe3f16c19499e37e0a118 /channels/chan_skinny.c
parent43e8ebed6170fdd31c5ca40aac06a06d4d848cd6 (diff)
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.. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56569 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r--channels/chan_skinny.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index b5a3f6550..c7e4b5976 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -2108,6 +2108,8 @@ static struct skinny_device *build_device(const char *cat, struct ast_variable *
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 @@ static int skinny_answer(struct ast_channel *ast)
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 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
if (skinnydebug)
ast_verbose("Received Stimulus: Hold(%d)\n", instance);
+ if (!sub)
+ break;
+
if (sub->onhold) {
skinny_unhold(sub);
} else {
@@ -3752,7 +3758,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
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 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
}
} else if (res) {
ast_log(LOG_WARNING, "Transfer attempt failed\n");
- return 0;
+ break;
}
#endif
} else {