[asterisk-commits] mvanbaak: trunk r151060 - /trunk/channels/chan_skinny.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Oct 19 08:10:50 CDT 2008
Author: mvanbaak
Date: Sun Oct 19 08:10:50 2008
New Revision: 151060
URL: http://svn.digium.com/view/asterisk?view=rev&rev=151060
Log:
dont segfault when placing a call to a line that has no registered device.
Modified:
trunk/channels/chan_skinny.c
Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?view=diff&rev=151060&r1=151059&r2=151060
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Sun Oct 19 08:10:50 2008
@@ -3783,6 +3783,11 @@
struct skinny_device *d = l->device;
struct ast_variable *v = NULL;
int fmt;
+
+ if (!l->device) {
+ ast_log(LOG_WARNING, "Device for line %s is not registered.\n", l->name);
+ return NULL;
+ }
tmp = ast_channel_alloc(1, state, l->cid_num, l->cid_name, l->accountcode, l->exten, l->context, l->amaflags, "Skinny/%s@%s-%d", l->name, d->name, callnums);
if (!tmp) {
More information about the asterisk-commits
mailing list