diff options
author | Gerald Carter <jerry@samba.org> | 2004-02-12 05:24:02 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-02-12 05:24:02 +0000 |
commit | df6d2db4ced5586320804950da58a62248db4d56 (patch) | |
tree | 31d2871b863a236ebc52b455ee39899c3940eb3c /source3/lib/util.c | |
parent | a6a2a696807992e60c905ff28828317fbcbe3913 (diff) | |
download | samba-df6d2db4ced5586320804950da58a62248db4d56.tar.gz samba-df6d2db4ced5586320804950da58a62248db4d56.tar.bz2 samba-df6d2db4ced5586320804950da58a62248db4d56.zip |
merge from old APP_HEAD
* remove corrupt tdb and shutdown (only for printing tdbs, connections,
sessionid & locking)
* decrement smbd counter in connections.tdb in smb_panic()
* various Makefile hack to get things to link
'max smbd processes' looks like it might be broken. The counter KEY is not
being set. Will look into that tomorrow.
(This used to be commit 6e22c5da929b6d9a4e32dc704c83112b2ad8fcfd)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r-- | source3/lib/util.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c index e9ab72b2bf..61dbc2cb2a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1341,6 +1341,14 @@ gid_t nametogid(const char *name) } /******************************************************************* + legacy wrapper for smb_panic2() +********************************************************************/ +void smb_panic( const char *why ) +{ + smb_panic2( why, True ); +} + +/******************************************************************* Something really nasty happened - panic ! ********************************************************************/ @@ -1348,7 +1356,7 @@ gid_t nametogid(const char *name) #include <libexc.h> #endif -void smb_panic(const char *why) +void smb_panic2(const char *why, BOOL decrement_pid_count ) { char *cmd; int result; @@ -1371,6 +1379,10 @@ void smb_panic(const char *why) } #endif + /* only smbd needs to decrement the smbd counter in connections.tdb */ + if ( decrement_pid_count ) + decrement_smbd_process_count(); + cmd = lp_panic_action(); if (cmd && *cmd) { DEBUG(0, ("smb_panic(): calling panic action [%s]\n", cmd)); |