summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-10-05 21:05:49 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-10-05 21:05:49 +0000
commit837fb51e74e116d082901e1ded9f01394a1b6081 (patch)
treedf2c27286d82db9f41238b990d5adb5ba8b7c5e4
parentc9d43ddd75df369df493c7547a2cf22bf2b1c4c8 (diff)
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
-rwxr-xr-xfxotune.c5
1 files changed, 5 insertions, 0 deletions
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] = "";