Various pain-in-the-ass bugs.
This commit is contained in:
parent
266b1390ab
commit
928cea0549
@ -27,10 +27,11 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $Amigan: phoned/phonectl/phonectl.c,v 1.8 2005/06/28 02:01:28 dcp1990 Exp $ */
|
||||
/* $Amigan: phoned/phonectl/phonectl.c,v 1.9 2005/06/29 22:02:23 dcp1990 Exp $ */
|
||||
/* system includes */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <netdb.h>
|
||||
@ -69,6 +70,7 @@ int main(argc, argv)
|
||||
exit(-1);
|
||||
}
|
||||
#endif
|
||||
fcntl(fileno(stdin), F_SETFL, O_NONBLOCK);
|
||||
if(argc == 1) {
|
||||
for(;;) {
|
||||
FD_ZERO(&fds);
|
||||
@ -82,7 +84,7 @@ int main(argc, argv)
|
||||
default:
|
||||
{
|
||||
if(FD_ISSET(fileno(stdin), &fds)) {
|
||||
fgets(buff, 1024, stdin);
|
||||
read(fileno(stdin), buff, 1024);
|
||||
nl = strchr(buff, '\n');
|
||||
if(nl != NULL) *nl = '\0';
|
||||
if(strcmp(buff, "#quit#") == 0) {
|
||||
|
@ -122,7 +122,7 @@ char *sendwr(str, bufferback, howmuch)
|
||||
write(modemfd, str, strlen(str) + 1);
|
||||
write(modemfd, "\r\n", 3);
|
||||
fds[0].fd = modemfd;
|
||||
fds[0].events = POLLRDNORM;
|
||||
fds[0].events = POLLRDNORM | POLLIN;
|
||||
switch(poll(fds, 1, 3000)) {
|
||||
case 0:
|
||||
pthread_cond_signal(&mpcond);
|
||||
|
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/* $Amigan: phoned/phoned/modems/rockwell.c,v 1.9 2005/06/28 02:00:08 dcp1990 Exp $ */
|
||||
/* $Amigan: phoned/phoned/modems/rockwell.c,v 1.10 2005/06/29 22:02:27 dcp1990 Exp $ */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@ -48,6 +48,8 @@ int rw_init(void)
|
||||
{
|
||||
stmod(ROCKWELL_INITSTRING);
|
||||
stmod("AT#CID=2");
|
||||
stmod("ATE0");
|
||||
stmod("ATV0");
|
||||
return 1;
|
||||
}
|
||||
int rw_destroy(void)
|
||||
|
Loading…
Reference in New Issue
Block a user