Add nbd.h to source
[nbd.git] / nbd-server.c
index 0800941..16d70f7 100644 (file)
@@ -274,7 +274,7 @@ int authorized_client(CLIENT *opts) {
                                return 0;
                        }
                        *(tmp++)=0;
-                       if(inet_aton(line,&addr)) {
+                       if(!inet_aton(line,&addr)) {
                                msg4(LOG_CRIT, ERRMSG, line, opts->server->authname);
                                return 0;
                        }
@@ -1924,7 +1924,11 @@ int main(int argc, char *argv[]) {
                g_warning("Could not parse config file: %s", 
                                err ? err->message : "Unknown error");
        }
-    
+       if(serve) {
+               g_warning("Specifying an export on the command line is deprecated.");
+               g_warning("Please use a configuration file instead.");
+       }
+
        if((!serve) && (!servers||!servers->len)) {
                g_message("Nothing to do! Bye!");
                exit(EXIT_FAILURE);