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 --- action_vbox.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'action_vbox.cpp') diff --git a/action_vbox.cpp b/action_vbox.cpp index 2426610..e325c0f 100644 --- a/action_vbox.cpp +++ b/action_vbox.cpp @@ -142,10 +142,7 @@ void EndpointAppPBX::vbox_index_read(int num) fduse++; i = 0; - while((fgets(buffer,sizeof(buffer),fp))) { - buffer[sizeof(buffer)-1] = '\0'; - if (buffer[0]) buffer[strlen(buffer)-1] = '\0'; - + while((GETLINE(buffer, fp))) { name[0] = callerid[0] = '\0'; mon = mday = hour = min = 0; sscanf(buffer, "%s %d %d %d %d %d %s", name, &year, &mon, &mday, &hour, &min, callerid); -- cgit v1.2.3-55-g7522