[svn-commits] branch 1.2 - r7550
/branches/1.2/apps/app_directed_pickup.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Tue Dec 20 11:34:01 CST 2005
Author: russell
Date: Tue Dec 20 11:34:00 2005
New Revision: 7550
URL: http://svn.digium.com/view/asterisk?rev=7550&view=rev
Log:
backport fix for segfault on directed pickup when no CDR is available (issue #5998)
Modified:
branches/1.2/apps/app_directed_pickup.c
Modified: branches/1.2/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_directed_pickup.c?rev=7550&r1=7549&r2=7550&view=diff
==============================================================================
--- branches/1.2/apps/app_directed_pickup.c (original)
+++ branches/1.2/apps/app_directed_pickup.c Tue Dec 20 11:34:00 2005
@@ -77,7 +77,7 @@
/* Find a channel to pickup */
origin = ast_get_channel_by_exten_locked(exten, context);
- if (origin) {
+ if (origin && origin->cdr) {
ast_cdr_getvar(origin->cdr, "dstchannel", &tmp, workspace,
sizeof(workspace), 0);
if (tmp) {
@@ -89,6 +89,8 @@
}
ast_mutex_unlock(&origin->lock);
} else {
+ if (origin)
+ ast_mutex_unlock(&origin->lock);
ast_log(LOG_DEBUG, "No originating channel found.\n");
}
More information about the svn-commits
mailing list