r285: Move first do_run command up slightly
authoryoe <yoe>
Wed, 19 Sep 2007 02:07:58 +0000 (02:07 +0000)
committeryoe <yoe>
Wed, 19 Sep 2007 02:07:58 +0000 (02:07 +0000)
configure.ac
nbd-server.c

index e02421c..af94654 100644 (file)
@@ -1,7 +1,7 @@
 dnl Configure script for NBD system
 dnl (c) 1998 Martin Mares <mj@ucw.cz>, (c) 2000 Pavel Machek <pavel@ucw.cz>,
 dnl (c) 2003-2006 Wouter Verhelst <wouter@debian.org>
-AC_INIT([nbd],[SVN],[wouter@debian.org])
+AC_INIT([nbd],[2.9.7],[wouter@debian.org])
 AM_INIT_AUTOMAKE(foreign dist-bzip2)
 AM_MAINTAINER_MODE
 
index d7109c6..8a085f9 100644 (file)
@@ -1276,6 +1276,9 @@ int do_run(gchar* command, gchar* file) {
  * @param client a connected client
  **/
 void serveconnection(CLIENT *client) {
+       if(do_run(client->server->prerun, client->exportname)) {
+               exit(EXIT_FAILURE);
+       }
        setupexport(client);
 
        if (client->server->flags & F_COPYONWRITE) {
@@ -1284,9 +1287,7 @@ void serveconnection(CLIENT *client) {
 
        setmysockopt(client->net);
 
-       if(!do_run(client->server->prerun, client->exportname)) {
-               mainloop(client);
-       }
+       mainloop(client);
        do_run(client->server->postrun, client->exportname);
 }