Append \r\n

This commit is contained in:
dcp1990 2005-06-22 21:58:48 +00:00
parent 602feb2016
commit 8183385a18

View File

@ -76,11 +76,13 @@ void stmod(str)
pthread_mutex_unlock(&mpipemx); pthread_mutex_unlock(&mpipemx);
pthread_mutex_lock(&modemmx); pthread_mutex_lock(&modemmx);
write(modemfd, str, strlen(str) + 1); write(modemfd, str, strlen(str) + 1);
write(modemfd, "\r\n", 3);
pthread_cond_signal(&mpcond); pthread_cond_signal(&mpcond);
pthread_mutex_unlock(&modemmx); pthread_mutex_unlock(&modemmx);
} else { } else {
pthread_mutex_lock(&modemmx); pthread_mutex_lock(&modemmx);
write(modemfd, str, strlen(str) + 1); write(modemfd, str, strlen(str) + 1);
write(modemfd, "\r\n", 3);
pthread_mutex_unlock(&modemmx); pthread_mutex_unlock(&modemmx);
} }
} }
@ -152,6 +154,7 @@ int init_modem(char* dev)
pthread_mutex_unlock(&modemmx); pthread_mutex_unlock(&modemmx);
mo = &rockwell; mo = &rockwell;
mo->init(); mo->init();
voice_init();
pthread_mutex_lock(&mpipemx); pthread_mutex_lock(&mpipemx);
pipe(modempipes); pipe(modempipes);
pthread_mutex_unlock(&mpipemx); pthread_mutex_unlock(&mpipemx);