From b2f4c51a0dc4b4dff0b551fc365b013d5ef46974 Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Thu, 7 Aug 2008 19:17:23 +0000 Subject: [PATCH] Stuff. --- phoned/Makefile | 4 ++-- phoned/modem.c | 2 ++ phoned/phoned.conf | 2 +- phoned/remote.c | 5 ++++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/phoned/Makefile b/phoned/Makefile index 65793f5..26d3fef 100644 --- a/phoned/Makefile +++ b/phoned/Makefile @@ -1,9 +1,9 @@ # cnd Makefile # (C)2005, Dan Ponte -# $Amigan: phoned/phoned/Makefile,v 1.14 2005/06/22 22:01:47 dcp1990 Exp $ +# $Amigan: phoned/phoned/Makefile,v 1.15 2008/08/07 19:17:23 dcp1990 Exp $ include ../global.mk # basic stuff. we append for a reason. -CPPFLAGS+=-I../include -DDEBUG -DYY_NO_UNPUT +CPPFLAGS+=-I../include -DDEBUG -DYY_NO_UNPUT -DMODDEBUG CFLAGS+=-g -Wall -W -ansi ${CPPFLAGS} -pthread LDFLAGS+=-lutil -lpcre -lsqlite3 # keep these up to date. diff --git a/phoned/modem.c b/phoned/modem.c index e8cf380..2ed50a7 100644 --- a/phoned/modem.c +++ b/phoned/modem.c @@ -206,6 +206,7 @@ int init_modem(char* dev) { int lres = 0; pthread_mutex_lock(&modemmx); +#ifndef MODDEBUG if(strlen(dev) < 7) { lprintf(error , "dev %s too short\n", dev); pthread_mutex_unlock(&modemmx); @@ -222,6 +223,7 @@ int init_modem(char* dev) pthread_mutex_unlock(&modemmx); return -1; } +#endif modemfd = open(dev, O_RDWR); if(modemfd == -1) { lprintf(error, "Error opening modem %s: %s\n", dev, strerror(errno)); diff --git a/phoned/phoned.conf b/phoned/phoned.conf index 64ad0da..f473914 100644 --- a/phoned/phoned.conf +++ b/phoned/phoned.conf @@ -1,5 +1,5 @@ main { - modemdev "/dev/cuad2"; + modemdev "/dev/cuad0"; loglevel all; database "./phoned.db"; socket "/tmp/phoned.sock"; diff --git a/phoned/remote.c b/phoned/remote.c index 4be7aae..569ab03 100644 --- a/phoned/remote.c +++ b/phoned/remote.c @@ -28,7 +28,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $Amigan: phoned/phoned/remote.c,v 1.19 2005/06/28 02:32:54 dcp1990 Exp $ */ +/* $Amigan: phoned/phoned/remote.c,v 1.20 2008/08/07 19:17:23 dcp1990 Exp $ */ /* system includes */ #include #include @@ -364,6 +364,9 @@ char *parse_command(cmd, cont, s) rc = parse_cid("802701083132323130383234070F5354414E444953482048454154494E020A343031333937333337325C\n"); cid_log(rc); cid_notify(rc); + /* XXX: memory leak!! free the members of the cid_t! make sure other code + * which uses dynamically-allocated cid_t's does so as well. + */ free(rc); *cont = 0; RNF("500 OK: Parser tested.\n");