diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-07-24 10:35:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:28:57 -0500 |
commit | 1ba6f17278353896c0a518c51a4c58ec9a073d40 (patch) | |
tree | 970e63ab157fdef50a43ef0daf9745865454f100 /source3 | |
parent | 4ce5c3636714e80f740c141587c1e7a9ca3b67bb (diff) | |
download | samba-1ba6f17278353896c0a518c51a4c58ec9a073d40.tar.gz samba-1ba6f17278353896c0a518c51a4c58ec9a073d40.tar.bz2 samba-1ba6f17278353896c0a518c51a4c58ec9a073d40.zip |
r24029: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
the claim_connection() must come after the sockets are open
metze
(This used to be commit 306846a14f554c55b57e9ce0ad324d5c81776330)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/server.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c index c09a0d7b98..491482eea6 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -349,6 +349,14 @@ static BOOL open_sockets_smbd(enum smb_server_mode server_mode, const char *smb_ maxfd = MAX(maxfd, fd_listenset[i]); } + + /* Setup the main smbd so that we can get messages. Note that + do this after starting listening. This is needed as when in + clustered mode, ctdb won't allow us to start doing database + operations until it has gone thru a full startup, which + includes checking to see that smbd is listening. */ + claim_connection(NULL,"",FLAG_MSG_GENERAL|FLAG_MSG_SMBD); + /* Listen to messages */ messaging_register(smbd_messaging_context(), NULL, @@ -1040,11 +1048,6 @@ extern void build_options(BOOL screen); return -1; } - /* Setup the main smbd so that we can get messages. */ - /* don't worry about general printing messages here */ - - claim_connection(NULL,"",FLAG_MSG_GENERAL|FLAG_MSG_SMBD); - /* only start the background queue daemon if we are running as a daemon -- bad things will happen if smbd is launched via inetd and we fork a copy of |