From 9838ab61435db5d505f80e7e5168db65b9704b17 Mon Sep 17 00:00:00 2001 From: MelwareDE Date: Sun, 17 Dec 2006 14:22:05 +0000 Subject: [PATCH] - don't error on invalid controller in capi.conf, just ignore it. --- chan_capi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chan_capi.c b/chan_capi.c index 3ea3193..0e513e6 100644 --- a/chan_capi.c +++ b/chan_capi.c @@ -5010,6 +5010,13 @@ int mkif(struct cc_capi_conf *conf) unit = capi_num_controllers; } + if (unit > capi_num_controllers){ + free(tmp); + cc_verbose(2, 0, VERBOSE_PREFIX_3 "controller %d invalid, ignoring interface.\n", + unit); + return 0; + } + /* always range check user input */ if (unit > CAPI_MAX_CONTROLLERS) unit = CAPI_MAX_CONTROLLERS;