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");