From 0fd01bf8e41800d5c7e7324109af0ca685687971 Mon Sep 17 00:00:00 2001 From: yoe Date: Wed, 19 Sep 2007 02:07:58 +0000 Subject: [PATCH] r285: Move first do_run command up slightly --- configure.ac | 2 +- nbd-server.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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); } -- 1.7.10.4