make -i flag work lik eit did in 2.2
authorGerald Carter <jerry@samba.org>
Tue, 14 Jan 2003 15:52:45 +0000 (15:52 +0000)
committerGerald Carter <jerry@samba.org>
Tue, 14 Jan 2003 15:52:45 +0000 (15:52 +0000)
source/smbd/server.c

index e8d92bf0646255d6f7f0ffca9737b5cc4b8c7a1e..194f9f2300cb0559445c627b16d1f27ecd5cdccd 100644 (file)
@@ -145,7 +145,7 @@ static void msg_exit_server(int msg_type, pid_t src, void *buf, size_t len)
  Open the socket communication.
 ****************************************************************************/
 
-static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
+static BOOL open_sockets_smbd(BOOL is_daemon, BOOL interactive, const char *smb_ports)
 {
        int num_interfaces = iface_count();
        int num_sockets = 0;
@@ -343,6 +343,9 @@ static BOOL open_sockets_smbd(BOOL is_daemon,const char *smb_ports)
                                         strerror(errno)));
                                continue;
                        }
+
+                       if (smbd_server_fd() != -1 && interactive)
+                               return True;
                        
                        if (smbd_server_fd() != -1 && sys_fork()==0) {
                                /* Child code ... */
@@ -809,7 +812,7 @@ static BOOL init_structs(void )
           start_background_queue(); 
        */
 
-       if (!open_sockets_smbd(is_daemon,ports))
+       if (!open_sockets_smbd(is_daemon, interactive, ports))
                exit(1);
 
        /*