The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_ipa.c 1.2 1.3=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
open_socket() returns negative value on error.
The diff of the modified file(s):
--- bt_ipa.c 2001/03/21 18:35:20 1.2
+++ bt_ipa.c 2001/04/11 12:54:52 1.3
@@ -64,8 +64,8 @@
{
int ipa_fd;
=20=20=20
- syslog(LOG_INFO, "Opening socket to IP Assigner\n");=20=20
- if (!(ipa_fd =3D open_socket(IPASERVER, CLIENT)))
+ syslog(LOG_INFO, "Opening socket to IP Assigner");
+ if ((ipa_fd =3D open_socket(IPASERVER, CLIENT)) < 0)
{=20=20
perror("open_socket");
return -1;
@@ -75,14 +75,14 @@
=20
void ipa_close(int ipa_fd)
{
- syslog(LOG_INFO, "Closing socket to IP Assigner\n");=20=20
+ syslog(LOG_INFO, "Closing socket to IP Assigner");=20=20
close(ipa_fd);
}
=20
/* Sends msg to IPA socket */
int ipa_write(int ipa_fd, ipa_msg *msg)
{
- syslog(LOG_INFO, "ipa_send : sending ipa request (type : %d) len %d \n",
+ syslog(LOG_INFO, "ipa_send: sending ipa request (type: %d) len %d",
msg->type, msg->len);
=20=20=20
return write(ipa_fd, msg, msg->len + sizeof(struct ipa_msg));
@@ -129,30 +129,29 @@
=20
void show_ipset(struct ip_set* set, int line)
{
- syslog(LOG_INFO, "IP set [line:%d]\n", line);
+ syslog(LOG_INFO, "IP set [line:%d]", line);
=20
if (set)
{=20=20=20=20
- syslog(LOG_INFO, " ip : %s\n", inet_ntoa(set->ip));
+ syslog(LOG_INFO, " ip: %s", inet_ntoa(set->ip));
+ syslog(LOG_INFO, " netmask: %s", inet_ntoa(set->netmask));
=20
if (set->nbr_of_dns >=3D 1)
- syslog(LOG_INFO, " dns1 : %s\n", inet_ntoa(set->dns[0]));
+ syslog(LOG_INFO, " dns1: %s", inet_ntoa(set->dns[0]));
=20
- if (set->nbr_of_dns =3D=3D 2)
- syslog(LOG_INFO, " dns2 : %s\n", inet_ntoa(set->dns[1]));
+ if (set->nbr_of_dns >=3D 2)
+ syslog(LOG_INFO, " dns2: %s", inet_ntoa(set->dns[1]));
=20
if (set->nbr_of_wins >=3D 1)
- syslog(LOG_INFO, " wins 1 : %s\n", inet_ntoa(set->wins[0]));
+ syslog(LOG_INFO, " wins1: %s", inet_ntoa(set->wins[0]));
=20
- if (set->nbr_of_wins =3D=3D 2)
- syslog(LOG_INFO, " wins2 : %s\n", inet_ntoa(set->wins[1]));
+ if (set->nbr_of_wins >=3D 2)
+ syslog(LOG_INFO, " wins2: %s", inet_ntoa(set->wins[1]));
=20
- syslog(LOG_INFO, " netmask : %s\n", inet_ntoa(set->netmask));
- syslog(LOG_INFO, "useradius : %d\n", set->useradius);
- syslog(LOG_INFO, "useradiusip : %d\n", set->useradiusip);
- syslog(LOG_INFO, "usingmasq : %d\n", set->usingmasq);
+ syslog(LOG_INFO, " useradius: %d", set->useradius);
+ syslog(LOG_INFO, "useradiusip: %d", set->useradiusip);
+ syslog(LOG_INFO, " usingmasq: %d", set->usingmasq);
}
}
=20
#endif /* USE_IPASSIGN */
-
|