From ccb9620a0a61054f0d5ca7b220b1eaf2fb7d8b44 Mon Sep 17 00:00:00 2001 From: MissValeska Date: Sun, 11 May 2014 20:10:42 -0700 Subject: [PATCH] I corrected a grammatical error in hook.c, And I removed some unnecessary debug lines. --- src/hook.c | 12 ++++++++---- src/inet.c | 11 +---------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/hook.c b/src/hook.c index aa8cd88..7308a22 100644 --- a/src/hook.c +++ b/src/hook.c @@ -1127,11 +1127,15 @@ hook_retry_scan: me.cur_node->flags|=MAP_HNODE; qspn_b_del_all_dead_rnodes(); } - - loginfo("We have %d nodes around us. (%d are hooking)", + if(me.cur_node->links < 1) { + loginfo("We have %d nodes around us. (%d are hooking)", me.cur_node->links, total_hooking_nodes); - - return 0; + } + else if(me.cur_node->links == 1) { + loginfo("We have %d node around us. (%d are hooking)", + me.cur_node->links, total_hooking_nodes); + } + return 0; } diff --git a/src/inet.c b/src/inet.c index 303b469..e47671b 100644 --- a/src/inet.c +++ b/src/inet.c @@ -1055,16 +1055,7 @@ ssize_t inet_sendto(int s, const void *msg, size_t len, int flags, ssize_t err; fd_set fdset; int ret; - - int sendbuf; - socklen_t optlen; - optlen = sizeof(sendbuf); - int res = getsockopt(s, SOL_SOCKET, SO_SNDBUF, &sendbuf, &optlen); - - error("GetSockOpt: %i \n", res); - - error("Socket: %i Data: %p Data Length: %u Flags: %i Address: %p Address Length: %u", s, msg, len, flags, to, tolen); - + if((err=sendto(s, msg, len, flags, to, tolen))==-1) { error("sendto errno: %d err is: %d", errno, err); switch(errno)