Fix dup_serve
authorWouter Verhelst <w@uter.be>
Mon, 21 Mar 2011 08:46:46 +0000 (09:46 +0100)
committerWouter Verhelst <w@uter.be>
Mon, 21 Mar 2011 08:46:46 +0000 (09:46 +0100)
Copy the virtstyle field too, and make sure that we copy everything from
's' (the source) rather than from 'serve' (the destination)

nbd-server.c

index 1873149..4b9a083 100644 (file)
@@ -599,8 +599,9 @@ SERVER* dup_serve(SERVER *s) {
                serve->authname = strdup(s->authname);
 
        serve->flags = s->flags;
-       serve->socket = serve->socket;
-       serve->socket_family = serve->socket_family;
+       serve->socket = s->socket;
+       serve->socket_family = s->socket_family;
+       serve->virtstyle = s->virtstyle;
        serve->cidrlen = s->cidrlen;
 
        if(s->prerun)