From 99436b65268d5921aa301e4d63f10027cc81a3a5 Mon Sep 17 00:00:00 2001 From: dcp1990 Date: Mon, 13 Jun 2005 03:41:50 +0000 Subject: [PATCH] Move pipe() to init, clean up unused warnings --- phoned/modem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phoned/modem.c b/phoned/modem.c index 21bda2e..1d50374 100644 --- a/phoned/modem.c +++ b/phoned/modem.c @@ -130,6 +130,9 @@ int init_modem(char* dev) } pthread_mutex_unlock(&modemmx); stmod(INITSTRING); + pthread_mutex_lock(&mpipemx); + pipe(modempipes); + pthread_mutex_unlock(&mpipemx); return 1; } int modem_evalrc(char* result) @@ -197,14 +200,11 @@ void *modem_io(k) void* k; { fd_set fds; - struct timeval tv; + /* struct timeval tv; + short dotm = 0; */ char cbuf[2]; - short dotm = 0; k = 0; *cbuf = '\0'; cbuf[1] = '\0'; - pthread_mutex_lock(&mpipemx); - pipe(modempipes); - pthread_mutex_unlock(&mpipemx); pthread_mutex_lock(&modemmx); for(;;) { pthread_mutex_lock(&cfmx);