head 1.2; access; symbols OPENPKG_E1_MP_HEAD:1.2 OPENPKG_E1_MP:1.2 OPENPKG_E1_MP_2_STABLE:1.1 OPENPKG_E1_FP:1.1 OPENPKG_2_STABLE_MP:1.1 OPENPKG_2_STABLE_20061018:1.1 OPENPKG_2_STABLE_20060622:1.1 OPENPKG_2_STABLE:1.1.0.14 OPENPKG_2_STABLE_BP:1.1 OPENPKG_2_5_RELEASE:1.1 OPENPKG_2_5_SOLID:1.1.0.12 OPENPKG_2_5_SOLID_BP:1.1 OPENPKG_2_4_RELEASE:1.1 OPENPKG_2_4_SOLID:1.1.0.10 OPENPKG_2_4_SOLID_BP:1.1 OPENPKG_CW_FP:1.1 OPENPKG_2_3_RELEASE:1.1 OPENPKG_2_3_SOLID:1.1.0.8 OPENPKG_2_3_SOLID_BP:1.1 OPENPKG_2_2_RELEASE:1.1 OPENPKG_2_2_SOLID:1.1.0.6 OPENPKG_2_2_SOLID_BP:1.1 OPENPKG_2_1_RELEASE:1.1 OPENPKG_2_1_SOLID:1.1.0.4 OPENPKG_2_1_SOLID_BP:1.1 OPENPKG_2_0_RELEASE:1.1 OPENPKG_2_0_SOLID:1.1.0.2 OPENPKG_2_0_SOLID_BP:1.1; locks; strict; comment @# @; 1.2 date 2006.12.19.08.00.31; author rse; state Exp; branches; next 1.1; commitid vebAo4p9mGOHG6Zr; 1.1 date 2003.08.28.16.13.24; author ms; state Exp; branches; next ; desc @@ 1.2 log @apply name resolving patch from Debian and fix PID file and STATE file handling @ text @Index: internet.c --- internet.c.orig 2000-09-30 19:42:51 +0200 +++ internet.c 2006-12-19 08:51:18 +0100 @@@@ -80,22 +80,19 @@@@ if (! isdigit(hostname[0])) { errno = 0; host = gethostbyname(hostname); + if (host == NULL) fatal(1,"unable to locate IP address/number",NULL); + if (host->h_length != sizeof(struct in_addr)) + fatal(0,"the address does not seem to be an Internet one",NULL); + *address = *((struct in_addr **)host->h_addr_list)[0]; } else { - if ((ipaddr = inet_addr(hostname)) == (unsigned long)-1) + if(!inet_aton(hostname, address)) fatal(0,"invalid IP number %s",hostname); - network_to_address(address,ipaddr); errno = 0; - host = gethostbyaddr((void *)address,sizeof(struct in_addr), - AF_INET); } /* Now clear the timer and check the result. */ clear_alarm(); - if (host == NULL) fatal(1,"unable to locate IP address/number",NULL); - if (host->h_length != sizeof(struct in_addr)) - fatal(0,"the address does not seem to be an Internet one",NULL); - *address = *((struct in_addr **)host->h_addr_list)[0]; if (memcmp(address,nowhere,sizeof(struct in_addr)) == 0 || memcmp(address,anywhere,sizeof(struct in_addr)) == 0 || memcmp(address,everywhere,sizeof(struct in_addr)) == 0) @@@@ -103,7 +100,7 @@@@ if (verbose) fprintf(stderr, "%s: using NTP server %s (%s)\n", - argv0,host->h_name,inet_ntoa(*address)); + argv0,hostname,inet_ntoa(*address)); } /* Find out the port number (usually from /etc/services), and leave it in Index: unix.c --- unix.c.orig 2000-10-26 11:57:10 +0200 +++ unix.c 2006-12-19 08:51:18 +0100 @@@@ -81,5 +81,7 @@@@ /* Log a message, crudely. This is used in only one place, but could be used more widely. */ - syslog(LOG_DAEMON|LOG_WARNING,"%s",message); + openlog("msntp", LOG_PID | LOG_NDELAY, LOG_DAEMON); + syslog(LOG_WARNING,"%s",message); + closelog(); } @ 1.1 log @Remove logging replacement hack, add FSL binding, implement features in ticket #202 @ text @d1 43 a43 3 diff -Naur msntp-1.6.orig/unix.c msntp-1.6/unix.c --- msntp-1.6.orig/unix.c 2003-08-28 17:48:15.000000000 +0200 +++ msntp-1.6/unix.c 2003-08-28 17:49:46.000000000 +0200 @