Fixed compilation with DEBUG symbol defined.
This commit is contained in:
parent
068795a73f
commit
89ed58114b
@ -444,7 +444,7 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
||||
} else {
|
||||
static const char nak_msg[] = "requested address not available";
|
||||
|
||||
DPRINTF("nak'ed addr=%08x\n", ntohl(preq_addr.s_addr));
|
||||
DPRINTF("nak'ed addr=%08x\n", ntohl(dhcp_opts.req_addr.s_addr));
|
||||
|
||||
*q++ = RFC2132_MSG_TYPE;
|
||||
*q++ = 1;
|
||||
|
@ -165,7 +165,7 @@ void if_start(Slirp *slirp)
|
||||
bool from_batchq, next_from_batchq;
|
||||
struct mbuf *ifm, *ifm_next, *ifqt;
|
||||
|
||||
DEBUG_CALL("if_start");
|
||||
// DEBUG_CALL("if_start"); // Disabled to avoid flooding output
|
||||
|
||||
if (slirp->if_start_busy) {
|
||||
return;
|
||||
@ -183,6 +183,10 @@ void if_start(Slirp *slirp)
|
||||
ifm_next = NULL;
|
||||
}
|
||||
|
||||
if (ifm_next) {
|
||||
DEBUG_CALL("if_start"); // Report only if something's to do
|
||||
}
|
||||
|
||||
while (ifm_next) {
|
||||
/* check if we can really output */
|
||||
if (!slirp_can_output(slirp->opaque)) {
|
||||
|
@ -141,7 +141,7 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
|
||||
bind(s, (struct sockaddr *)&addr, addrlen) < 0 ||
|
||||
listen(s, 1) < 0) {
|
||||
#ifdef DEBUG
|
||||
lprint("Error: inet socket: %s\n", strerror(errno));
|
||||
printf("Error: inet socket: %s\n", strerror(errno));
|
||||
#endif
|
||||
closesocket(s);
|
||||
|
||||
@ -153,7 +153,7 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
|
||||
switch(pid) {
|
||||
case -1:
|
||||
#ifdef DEBUG
|
||||
lprint("Error: fork failed: %s\n", strerror(errno));
|
||||
printf("Error: fork failed: %s\n", strerror(errno));
|
||||
#endif
|
||||
close(s);
|
||||
return 0;
|
||||
|
@ -152,7 +152,7 @@ int get_dns_addr(struct in_addr *pdns_addr)
|
||||
return -1;
|
||||
|
||||
#ifdef DEBUG
|
||||
lprint("IP address of your DNS(s): ");
|
||||
printf("IP address of your DNS(s): ");
|
||||
#endif
|
||||
while (fgets(buff, 512, f) != NULL) {
|
||||
if (sscanf(buff, "nameserver%*[ \t]%256s", buff2) == 1) {
|
||||
@ -166,17 +166,17 @@ int get_dns_addr(struct in_addr *pdns_addr)
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
lprint(", ");
|
||||
printf(", ");
|
||||
#endif
|
||||
if (++found > 3) {
|
||||
#ifdef DEBUG
|
||||
lprint("(more)");
|
||||
printf("(more)");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
lprint("%s", inet_ntoa(tmp_addr));
|
||||
printf("%s", inet_ntoa(tmp_addr));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user