Browse Source

I corrected a grammatical error in hook.c, And I removed some unnecessary debug lines.

MissValeska 10 years ago
parent
commit
ccb9620a0a
2 changed files with 9 additions and 14 deletions
  1. 8
    4
      src/hook.c
  2. 1
    10
      src/inet.c

+ 8
- 4
src/hook.c View File

1127
 		me.cur_node->flags|=MAP_HNODE;
1127
 		me.cur_node->flags|=MAP_HNODE;
1128
 		qspn_b_del_all_dead_rnodes();
1128
 		qspn_b_del_all_dead_rnodes();
1129
 	}
1129
 	}
1130
-
1131
-	loginfo("We have %d nodes around us. (%d are hooking)", 
1130
+        if(me.cur_node->links < 1) {
1131
+            loginfo("We have %d nodes around us. (%d are hooking)", 
1132
 			me.cur_node->links, total_hooking_nodes);
1132
 			me.cur_node->links, total_hooking_nodes);
1133
-
1134
-	return 0;
1133
+        }
1134
+        else if(me.cur_node->links == 1) {
1135
+            loginfo("We have %d node around us. (%d are hooking)", 
1136
+			me.cur_node->links, total_hooking_nodes);
1137
+	}
1138
+        return 0;
1135
 }
1139
 }
1136
 
1140
 
1137
 
1141
 

+ 1
- 10
src/inet.c View File

1055
 	ssize_t err;
1055
 	ssize_t err;
1056
 	fd_set fdset;
1056
 	fd_set fdset;
1057
 	int ret;
1057
 	int ret;
1058
-        
1059
-        int sendbuf;
1060
-        socklen_t optlen;
1061
-        optlen = sizeof(sendbuf);
1062
-        int res = getsockopt(s, SOL_SOCKET, SO_SNDBUF, &sendbuf, &optlen);
1063
-                                
1064
-        error("GetSockOpt: %i \n", res);
1065
-        
1066
-        error("Socket: %i Data: %p Data Length: %u Flags: %i Address: %p Address Length: %u", s, msg, len, flags, to, tolen);
1067
-        
1058
+                                                        
1068
 	if((err=sendto(s, msg, len, flags, to, tolen))==-1) {
1059
 	if((err=sendto(s, msg, len, flags, to, tolen))==-1) {
1069
 		error("sendto errno: %d err is: %d", errno, err);
1060
 		error("sendto errno: %d err is: %d", errno, err);
1070
 		switch(errno)
1061
 		switch(errno)

Loading…
Cancel
Save