[Nbd] Bugs
Hi,
I think I have found two bugs in nbd-server 2.9.7:
* server defined from command line doesn't support %s in filenames
* server socket closing loop uses a bad condition
I have attached a patch that fixes these problems. What do you think?
bye,
Filip Zyzniewski
Tefnet
diff -Naur nbd-2.9.7-orig/nbd-server.c nbd-2.9.7/nbd-server.c
--- nbd-2.9.7-orig/nbd-server.c 2007-09-18 14:29:55.000000000 +0200
+++ nbd-2.9.7/nbd-server.c 2007-09-26 10:17:10.000000000 +0200
@@ -407,6 +407,7 @@
}
serve=g_new0(SERVER, 1);
serve->authname = g_strdup(default_authname);
+ serve->virtstyle=VIRT_IPLIT;
while((c=getopt_long(argc, argv, "-a:C:cl:mo:rp:", long_options, &i))>=0) {
switch (c) {
case 1:
@@ -1524,7 +1525,8 @@
}
/* child */
g_hash_table_destroy(children);
- for(i=0;i<servers->len,serve=(g_array_index(servers, SERVER*, i));i++) {
+ for(i=0;i<servers->len;i++) {
+ serve=g_array_index(servers, SERVER*, i);
close(serve->socket);
}
/* FALSE does not free the
Reply to: