tmdns patches
Steve G <[email protected]> Thu, 5 Feb 2004 12:28:11 -0800 (PST)
| Newsgroups | gmane.network.zeroconf.workers |
|---|---|
| Message-ID | <[email protected]> |
Hello, I've been busy with another project this week. I finally did some diff's between my tree and cvs and only had 1 real difference. The attached patch adds a check for getifaddr's return code in serv_udp.c. The patch also fixes a couple more spelling issues. I will have some time this weekend to get a spec file put together and continue the testing. In the mean time...right now some of the key structure have been updated to have stuff like u_int32_t which is not the posix supported way. Solaris will probably have problems compiling this. Posix allows for uint32_t, which gets included via inttypes.h. Do you want a patch for this? Also, there are still some structures in dns.h that use int and long, is this a concern or should they be converted to uint32_t uint16_t where possible? -Steve Grubb __________________________________ Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online. http://taxes.yahoo.com/filing.html
tmdns-patch7.txt
(text/plain, 2.6 KB)
diff -ur tmdns/server/dns.h tmdns.a/server/dns.h
--- tmdns/server/dns.h 2004-02-01 15:48:24.000000000 -0500
+++ tmdns.a/server/dns.h 2004-02-05 13:34:34.000000000 -0500
@@ -62,7 +62,7 @@
short id; /* the query id for this query */
int want_recursion; /* 1 if the client wants recursion */
int inverse; /* 1 if invers query, 0 else */
- int nquest; /* number of wuestions in this query*/
+ int nquest; /* number of questions in this query*/
dns_question question[MAXQUEST_PER_QUERY]; /* Questions within this query */
} dns_query;
@@ -97,10 +97,10 @@
char * admin; /* mailbox of the administrator */
long serial; /* serial number for the data */
long refresh; /* refresh time for zone data */
- long retry; /* time to wait before a faild
+ long retry; /* time to wait before a failed
refresh should be retried. */
long expire; /* time until zone data expires */
- long min_ttl; /* minitmum ttl value for all RR's*/
+ long min_ttl; /* minimum ttl value for all RR's*/
} dns_soa_rr;
typedef struct {
diff -ur tmdns/server/info.c tmdns.a/server/info.c
--- tmdns/server/info.c 2004-02-01 09:10:25.000000000 -0500
+++ tmdns.a/server/info.c 2004-02-05 13:12:29.000000000 -0500
@@ -267,7 +267,7 @@
char * escaped = NULL;
escaped = escapeDomainLabel(name);
if( strlen(escaped) > 63 ) {
- debug("truncate service name becaues it longer than 63 chars.\n");
+ debug("truncate service name becaues its longer than 63 chars.\n");
escaped[63] = 0;
}
asprintf(&serv_name, "%s._%s._%s.local",escaped,service,proto);
diff -ur tmdns/server/llist.h tmdns.a/server/llist.h
--- tmdns/server/llist.h 2004-01-31 13:01:41.000000000 -0500
+++ tmdns.a/server/llist.h 2004-02-05 13:16:07.000000000 -0500
@@ -48,7 +48,7 @@
extern void ll_remove(ll_entry_t *);
-/*... move element to from of list ... */
+/*... move element to front of list ... */
extern void ll_to_front(ll_entry_t *);
diff -ur tmdns/server/serv_udp.c tmdns.a/server/serv_udp.c
--- tmdns/server/serv_udp.c 2004-02-01 15:48:24.000000000 -0500
+++ tmdns.a/server/serv_udp.c 2004-02-05 13:17:35.000000000 -0500
@@ -99,7 +99,10 @@
*
* We need to distinguish between mcast and unicast
*/
- getifaddrs(&ifs);
+ if (getifaddrs(&ifs) < 0) {
+ syslog(LOG_ERR,"getifaddrs failed...exiting.");
+ exit(1);
+ }
for(ifnow = ifs; ifnow; ifnow = ifnow->ifa_next) {
switch( ifnow->ifa_addr->sa_family ) {