summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-07-20 08:44:34 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-07-20 08:44:34 +0000
commitf65440ff52139ce7710d03cbb6b37360e3391d32 (patch)
tree3ecd2dc0414706f196b3be06d7d5e610633afb05 /source3/smbd
parent714abda3e749ae364806633b2ccc17c03a453bf4 (diff)
downloadsamba-f65440ff52139ce7710d03cbb6b37360e3391d32.tar.gz
samba-f65440ff52139ce7710d03cbb6b37360e3391d32.tar.bz2
samba-f65440ff52139ce7710d03cbb6b37360e3391d32.zip
Move some startup time initialisation to server.c, so it is all in one place.
I'm not sure that we need that "dummy" talloc init, but anyway... Also, add some 'const' to the table of smb reply functions. Andrew Bartlett (This used to be commit 790b7c9ab82f930da66426e7a932d7365bd27725)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c15
-rw-r--r--source3/smbd/server.c7
2 files changed, 11 insertions, 11 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 0363165914..6e38f3736e 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -341,9 +341,9 @@ force write permissions on print services.
functions. Any message that has a NULL function is unimplemented -
please feel free to contribute implementations!
*/
-static struct smb_message_struct
+const static struct smb_message_struct
{
- char *name;
+ const char *name;
int (*fn)(connection_struct *conn, char *, char *, int, int);
int flags;
}
@@ -611,7 +611,7 @@ static struct smb_message_struct
/*******************************************************************
dump a prs to a file
********************************************************************/
-static void smb_dump(char *name, int type, char *data, ssize_t len)
+static void smb_dump(const char *name, int type, char *data, ssize_t len)
{
int fd, i;
pstring fname;
@@ -896,7 +896,7 @@ void process_smb(char *inbuf, char *outbuf)
/****************************************************************************
return a string containing the function name of a SMB command
****************************************************************************/
-char *smb_fn_name(int type)
+const char *smb_fn_name(int type)
{
static char *unknown_name = "SMBunknown";
@@ -1228,13 +1228,6 @@ void smbd_process(void)
max_recv = MIN(lp_maxxmit(),BUFFER_SIZE);
- /* re-initialise the timezone */
- TimeInit();
-
- /* register our message handlers */
- message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis);
- talloc_init_named("dummy!");
-
while (True) {
int deadtime = lp_deadtime()*60;
int select_timeout = setup_select_timeout();
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index a0d448151f..fdc59f12c0 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -887,6 +887,13 @@ static void usage(char *pname)
if (!init_change_notify())
exit(1);
+ /* re-initialise the timezone */
+ TimeInit();
+
+ /* register our message handlers */
+ message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis);
+ talloc_init_named("dummy!");
+
smbd_process();
uni_group_cache_shutdown();