aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-21 07:13:20 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-21 07:13:20 +0000
commit6f31fb8d05cc076f40851e36894bf4cf1f24a9eb (patch)
treeb8dcc688e6ecd236c234d0492215efefb5ad1c2b /channels
parent8dce4aeeb712a43a934f8b7ade2658f3d328e11b (diff)
Finally fix parking and go back to metermaids
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35209 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 92a371705..be5409991 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11967,6 +11967,10 @@ static void *sip_park_thread(void *stuff)
copy_request(&req, &d->req);
free(d);
+ if (!transferee || !transferer) {
+ ast_log(LOG_ERROR, "Missing channels for parking! Transferer %s Transferee %s\n", transferer ? "<available>" : "<missing>", transferee ? "<available>" : "<missing>" );
+ return;
+ }
if (option_debug > 3)
ast_log(LOG_DEBUG, "SIP Park: Transferer channel %s, Transferee %s\n", transferer->name, transferee->name);
@@ -12088,7 +12092,8 @@ static int sip_park(struct ast_channel *chan1, struct ast_channel *chan2, struct
d->chan1 = transferee; /* Transferee */
d->chan2 = transferer; /* Transferer */
d->seqno = seqno;
- if (!ast_pthread_create(&th, NULL, sip_park_thread, d)) {
+ if (ast_pthread_create(&th, NULL, sip_park_thread, d) < 0) {
+ /* Could not start thread */
free(d); /* We don't need it anymore. If thread is created, d will be free'd
by sip_park_thread() */
return 0;