Move pipe() to init, clean up unused warnings
This commit is contained in:
parent
a0fd36072c
commit
99436b6526
@ -130,6 +130,9 @@ int init_modem(char* dev)
|
|||||||
}
|
}
|
||||||
pthread_mutex_unlock(&modemmx);
|
pthread_mutex_unlock(&modemmx);
|
||||||
stmod(INITSTRING);
|
stmod(INITSTRING);
|
||||||
|
pthread_mutex_lock(&mpipemx);
|
||||||
|
pipe(modempipes);
|
||||||
|
pthread_mutex_unlock(&mpipemx);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
int modem_evalrc(char* result)
|
int modem_evalrc(char* result)
|
||||||
@ -197,14 +200,11 @@ void *modem_io(k)
|
|||||||
void* k;
|
void* k;
|
||||||
{
|
{
|
||||||
fd_set fds;
|
fd_set fds;
|
||||||
struct timeval tv;
|
/* struct timeval tv;
|
||||||
|
short dotm = 0; */
|
||||||
char cbuf[2];
|
char cbuf[2];
|
||||||
short dotm = 0;
|
|
||||||
k = 0;
|
k = 0;
|
||||||
*cbuf = '\0'; cbuf[1] = '\0';
|
*cbuf = '\0'; cbuf[1] = '\0';
|
||||||
pthread_mutex_lock(&mpipemx);
|
|
||||||
pipe(modempipes);
|
|
||||||
pthread_mutex_unlock(&mpipemx);
|
|
||||||
pthread_mutex_lock(&modemmx);
|
pthread_mutex_lock(&modemmx);
|
||||||
for(;;) {
|
for(;;) {
|
||||||
pthread_mutex_lock(&cfmx);
|
pthread_mutex_lock(&cfmx);
|
||||||
|
Loading…
Reference in New Issue
Block a user