diff --git a/y_socket_t/src/y_socket_t/y_node_t.c b/y_socket_t/src/y_socket_t/y_node_t.c index cc7e5dd..67c0860 100644 --- a/y_socket_t/src/y_socket_t/y_node_t.c +++ b/y_socket_t/src/y_socket_t/y_node_t.c @@ -32,7 +32,7 @@ int y_NODE_T_cmp(y_NODE_T nodeA, y_NODE_T nodeB){ int ret=0; //ret = nodeA.addr_len - nodeB.addr_len; - if(ret == 0){ + //if(ret == 0){ printf("debug: ++++++++++++ lenA=%d, lenB=%d\n", nodeA.addr_len , nodeB.addr_len); ret = nodeA.addr.ss_family - nodeB.addr.ss_family; @@ -54,7 +54,7 @@ int y_NODE_T_cmp(y_NODE_T nodeA, y_NODE_T nodeB){ ret = memcmp(((struct sockaddr_in6*)&(nodeA.addr))->sin6_addr.s6_addr , ((struct sockaddr_in6*)&(nodeB.addr))->sin6_addr.s6_addr, 8); } } - } + //} return ret; } diff --git a/y_socket_t/src/y_socket_t/y_socket_t.c b/y_socket_t/src/y_socket_t/y_socket_t.c index 687f342..cb01af4 100644 --- a/y_socket_t/src/y_socket_t/y_socket_t.c +++ b/y_socket_t/src/y_socket_t/y_socket_t.c @@ -426,8 +426,8 @@ void *y_socket_poll_fds(void *arg){ // I had to initialize all attribute of addr to avoid error uninitialized value with valgrind, for example "sin6_flowinfo" in sockaddr_in6 memset(&(node.addr), 0, sizeof(struct sockaddr_storage)); //size_t len_sockaddr_storage = sizeof(struct sockaddr_storage); - //node.addr_len = len_sockaddr_storage; // sizeof(struct sockaddr_storage); - node.addr_len = 0;/* init here to be sure it will have the appropriate value */ + node.addr_len = sizeof(struct sockaddr_storage); + //node.addr_len = 0;/* init here to be sure it will have the appropriate value */ // printf("debug: ------ //// node.addr_len = %d\n",node.addr_len); for(;check_y_socket_go_on(argSock);){ printf("poll: wait events\n");