[asterisk-commits] trunk - r7541 /trunk/apps/app_directed_pickup.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Dec 20 03:56:57 CST 2005
Author: markster
Date: Tue Dec 20 03:56:55 2005
New Revision: 7541
URL: http://svn.digium.com/view/asterisk?rev=7541&view=rev
Log:
Fix segfault on directed pickup when no CDR is available (bug #5998)
Modified:
trunk/apps/app_directed_pickup.c
Modified: trunk/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_directed_pickup.c?rev=7541&r1=7540&r2=7541&view=diff
==============================================================================
--- trunk/apps/app_directed_pickup.c (original)
+++ trunk/apps/app_directed_pickup.c Tue Dec 20 03:56:55 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 asterisk-commits
mailing list