diff --git a/src/andns.c b/src/andns.c index 0f64591..0f5dace 100644 --- a/src/andns.c +++ b/src/andns.c @@ -199,12 +199,15 @@ andns_init(int restricted, char *resolv_conf, int family) if (_default_realm_ == NTK_REALM) { /* We are in NTK realm, every IP is assigned to Netsukuku, * therefore dns forwarding is meaningless */ + loginfo("We are in the ntk realm %s\n", strerror(errno)); _dns_forwarding_ = 0; return 0; } res = collect_resolv_conf(resolv_conf); if (res <= 0) { + loginfo("Some kind of error occurred in collecting the dns nameservers" + " %s\n", strerror(errno)); _dns_forwarding_ = 0; debug(DBG_NORMAL, err_str); err_ret(ERR_RSLAIE, -1); diff --git a/src/inet.c b/src/inet.c index c7bae2b..7cba24c 100644 --- a/src/inet.c +++ b/src/inet.c @@ -1062,7 +1062,6 @@ inet_send(int s, const void *msg, size_t len, int flags) inet_send(s, msg, len/2, flags); err=inet_send(s, (const char *)msg+(len/2), len-(len/2), flags); - error("\nEMSGSIZE inet_send testing.\n"); break; default: @@ -1110,29 +1109,22 @@ inet_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr * to, socklen_t tolen) { ssize_t err; - /* How are these last two arguments used when the function being called - * doesn't have those arguments? */ if ((err = sendto(s, msg, len, flags, to, tolen)) == -1) { - error("sendto errno: %d err is: %d", errno, err); + error("sendto: %s err is: %d", strerror(errno), err); switch (errno) { case EMSGSIZE: - error("Packet artificially fragmented: %d", stderr); - error("\nData Length: %u", len); inet_sendto(s, msg, len/2, flags, to, tolen); err=inet_sendto(s, (const char *)msg+(len/2), len-(len/2), flags, to, tolen); - error("\nsendto error after fragmention is: %d, err is: %d\n", errno, err); break; case EFAULT: - error("The value of to is: %d", to); + error("The value of to is: %d and %s", to, strerror(errno)); default: error("inet_sendto: Cannot send(): %s", strerror(errno)); return err; break; } - error("\nSuccessfully sent packet, errno: %d\n", errno); - } return err; }