From: yoe Date: Wed, 19 Sep 2007 02:07:58 +0000 (+0000) Subject: r285: Move first do_run command up slightly X-Git-Url: http://git.alex.org.uk r285: Move first do_run command up slightly --- diff --git a/configure.ac b/configure.ac index e02421c..af94654 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Configure script for NBD system dnl (c) 1998 Martin Mares , (c) 2000 Pavel Machek , dnl (c) 2003-2006 Wouter Verhelst -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 diff --git a/nbd-server.c b/nbd-server.c index d7109c6..8a085f9 100644 --- a/nbd-server.c +++ b/nbd-server.c @@ -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); }