From 837fb51e74e116d082901e1ded9f01394a1b6081 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Wed, 5 Oct 2005 21:05:49 +0000 Subject: make fxotune not segfault when config file is not present git-svn-id: http://svn.digium.com/svn/zaptel/trunk@793 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- fxotune.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fxotune.c b/fxotune.c index 8a7ad19..f518260 100755 --- a/fxotune.c +++ b/fxotune.c @@ -282,6 +282,11 @@ set: fp = fopen(configfile, "r"); + if (!fp) { + fprintf(stdout, "Cannot open %s!\n",configfile); + return -1; + } + for (i = 0;res != EOF; i++) { struct wctdm_echo_coefs mycoefs; char completezappath[56] = ""; -- cgit v1.2.3