Explorar el Código

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

MissValeska hace 10 años
padre
commit
ccb9620a0a
Se han modificado 2 ficheros con 9 adiciones y 14 borrados
  1. 8
    4
      src/hook.c
  2. 1
    10
      src/inet.c

+ 8
- 4
src/hook.c Ver fichero

@@ -1127,11 +1127,15 @@ hook_retry_scan:
1127 1127
 		me.cur_node->flags|=MAP_HNODE;
1128 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 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 Ver fichero

@@ -1055,16 +1055,7 @@ ssize_t inet_sendto(int s, const void *msg, size_t len, int flags,
1055 1055
 	ssize_t err;
1056 1056
 	fd_set fdset;
1057 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 1059
 	if((err=sendto(s, msg, len, flags, to, tolen))==-1) {
1069 1060
 		error("sendto errno: %d err is: %d", errno, err);
1070 1061
 		switch(errno)

Loading…
Cancelar
Guardar