Files
macports-ports/net/nsping/files/patch-dprintf.diff

55 lines
1.5 KiB
Diff

--- nsping.c.orig 1997-11-26 02:11:39.000000000 -0600
+++ nsping.c 2011-09-15 22:58:32.000000000 -0500
@@ -379,19 +379,19 @@
/* descriminate real responses from spurious crud */
if(si.sin_addr.s_addr != Target_Address) {
- dprintf("Received packet from unexpected address %s.\n",
+ ddprintf("Received packet from unexpected address %s.\n",
inet_ntoa(si.sin_addr));
continue;
}
if(si.sin_port != htons(Target_Port)) {
- dprintf("Received packet from unexpected port %d.\n",
+ ddprintf("Received packet from unexpected port %d.\n",
ntohs(si.sin_port));
continue;
}
if(l < sizeof(HEADER)) {
- dprintf("Short packet.\n");
+ ddprintf("Short packet.\n");
continue;
}
@@ -431,7 +431,7 @@
break;
if(i == QUERY_BACKLOG) {
- dprintf("Packet with id %d not ours.\n", ntohs(hp->id));
+ ddprintf("Packet with id %d not ours.\n", ntohs(hp->id));
return;
} else
Queries[i].found = 1;
@@ -610,7 +610,7 @@
/* don't print if we're not in debug mode */
-void dprintf(char *fmt, ...) {
+void ddprintf(char *fmt, ...) {
va_list ap;
if(!Debug)
--- nsping.h.orig 1997-11-24 03:47:25.000000000 -0600
+++ nsping.h 2011-09-15 22:58:21.000000000 -0500
@@ -42,7 +42,7 @@
struct timeval *timeval_subtract(struct timeval *out, struct timeval *in);
char *addr_string(u_int32_t address);
int bind_udp_socket(u_int32_t address, u_int16_t port);
-void dprintf(char *fmt, ...);
+void ddprintf(char *fmt, ...);
void usage(void);
char *xstrdup(char *v);
u_int32_t resolve(char *name);