From: Peter K. <pk...@us...> - 2001-09-13 12:20:53
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- btd.c 1.27 1.28=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: Use ipa_fd to check if an IP assigner is used instead of ipa_available. The diff of the modified file(s): --- btd.c 2001/09/10 09:41:50 1.27 +++ btd.c 2001/09/13 12:20:52 1.28 @@ -168,7 +168,6 @@ static int do_hwinit =3D 1; /* do vendor specific initialization */ static int do_reset =3D 0; /* reset hw using I/O pins */ =20 -static int ipa_available =3D 0; /* is set if IPA was successfully initiali= zed */ static int modem_emul =3D 1; /* default modem emulation is enabled */ static int init_hw_speed =3D 0; /* not set */ =20 @@ -323,7 +322,7 @@ =20 FD_ZERO(&rfd);=20=20 =20 - if (ipa_available) + if (ipa_fd >=3D 0) FD_SET(ipa_fd, &rfd); =20=20=20=20=20 FD_SET(0, &rfd); @@ -371,12 +370,10 @@ { #ifdef USE_IPASSIGN /* Got data on some fd */ - int i, retval; + int retval; =20 - for (i =3D 0; i < result; i++)=20 - { /* IPA response */ - if (FD_ISSET(ipa_fd, &rfd)) + if (ipa_fd >=3D 0 && FD_ISSET(ipa_fd, &rfd)) { msg =3D (struct ipa_msg*) ipa_buf; /* Got response from IPA, if ok then start pppd or modem emul = */ @@ -400,7 +397,6 @@ } }=20=20=20=20=20=20=20=20=20=20=20 } - }=20 #endif } break; @@ -425,7 +421,7 @@ read_remote_bd(bt_cfd, line, PEER(line).remote_bd); printf("Remote bd: %s\n", bd2str(PEER(line).remote_bd)); =20=20=20=20=20=20=20 - if (ipa_available) + if (ipa_fd >=3D 0) {=20=20 D(syslog(LOG_INFO, "Sending IPA request")); =20=20=20=20=20=20=20=20=20 @@ -462,7 +458,7 @@ struct ip_set *ipset =3D PEER(line).ipset; char local_ip[20]; =20=20=20 - if (ipa_available) + if (ipa_fd >=3D 0) show_ipset(ipset, line); =20=20=20 D(syslog(LOG_INFO, __FUNCTION__)); @@ -760,7 +756,7 @@ =20=20=20=20=20 D(syslog(LOG_INFO, "PPP line %d was shutdown", line)); =20=20=20=20=20 - if (ipa_available)=20 + if (ipa_fd >=3D 0) {=20 STATE(line) =3D WAITING_RETURN_PPPCONF; =20=20=20=20=20=20=20 @@ -834,7 +830,6 @@ else=20 {=20=20=20=20=20=20 D(syslog(LOG_INFO, "Found IPA server")); - ipa_available =3D 1; } }=20 #endif |