From b987a1bbbcabbf183ebe009903778671a1591337 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Tue, 27 Oct 2009 07:53:27 +0100 Subject: Fixes and improves parsing of config file. Last character of unterminated line was ignored. Minor bug fix in 2600 Hz pulse dialing. modified: README modified: action_vbox.cpp modified: crypt.cpp modified: extension.c modified: gsm_conf.c modified: interface.c modified: macro.h modified: route.c modified: ss5.cpp modified: ss5.h --- gsm_conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gsm_conf.c') diff --git a/gsm_conf.c b/gsm_conf.c index 9957b86..082a6ed 100644 --- a/gsm_conf.c +++ b/gsm_conf.c @@ -47,10 +47,8 @@ int gsm_conf(struct gsm_conf *gsm_conf) } line=0; - while((fgets(buffer,sizeof(buffer),fp))) { + while((GETLINE(buffer, fp))) { line++; - buffer[sizeof(buffer)-1]=0; - if (buffer[0]) buffer[strlen(buffer)-1]=0; p=buffer; while(*p <= 32) { /* skip spaces */ -- cgit v1.2.3-55-g7522