diff options
-rw-r--r-- | src/kernel/net.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/kernel/net.c b/src/kernel/net.c index 2931aea..ef3988e 100644 --- a/src/kernel/net.c +++ b/src/kernel/net.c @@ -330,9 +330,7 @@ static void discovery(struct work_struct *work) dnbd3_sock *sock = &dev->socks[0]; // we use the first sock for discovery struct request *req; int i, j; - struct dnbd3_server *existing_server = NULL; - struct dnbd3_server *free_server = NULL; - struct dnbd3_server *failed_server = NULL; + struct dnbd3_server *existing_server, *free_server, *failed_server; dnbd3_server_entry_t *new_server; printk(KERN_DEBUG "dnbd3: starting discovery worker\n"); mutex_lock(&sock->lock); @@ -355,6 +353,9 @@ static void discovery(struct work_struct *work) for (i = 0; i < dev->new_servers_num; i++) { new_server = &dev->new_servers[i]; if (new_server->host.type == HOST_IP4 || new_server->host.type == HOST_IP6) { + existing_server = NULL; + free_server = NULL; + failed_server = NULL; // find servers in alt servers for (j = 0; j < NUMBER_SERVERS; j++) { |