|
From: Peter K. <pk...@us...> - 2001-10-16 16:56:26
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
modememul.c 1.14 1.15=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Do not close btfd if bt_isconnected() returns false, as it is
not open at that point.
* Corrected exit values.
The diff of the modified file(s):
--- modememul.c 2001/10/16 16:18:49 1.14
+++ modememul.c 2001/10/16 16:56:25 1.15
@@ -120,8 +120,8 @@
speedstr =3D argv[2];
if(sscanf(argv[1], "/dev/ttyBT%d", &line) !=3D 1)
{
- syslog(LOG_INFO, "Invalid arguments to modememulator\n");
- exit(0);
+ fprintf(stderr, "Invalid arguments to modememulator\n");
+ exit(1);
}=20=20=20=20
=20
while (done !=3D START_PPP)
@@ -130,9 +130,8 @@
=20
if(!bt_isconnected(-1, line))
{
- D(syslog(LOG_INFO, "No BT connection, stopping modememulator\n"));
- close(btfd);
- _exit(0);
+ D(syslog(LOG_INFO, "No BT connection, stopping modememulator"));
+ exit(0);
}
=20
if ((btfd =3D open(argv[1], O_RDWR, 0)) < 0)
@@ -156,7 +155,7 @@
execvp(PPPDCMD, argv /*pppd_options*/);
=20=20=20
fprintf(stderr, "%s: no such file or directory\n", PPPDCMD);
- _exit(0);
+ exit(1);
}
=20
int modem_emulator(int bt_fd)
|