summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-05-22 18:56:51 +0000
committerJeremy Allison <jra@samba.org>2003-05-22 18:56:51 +0000
commit78a4f6fc4b8938fcab5bb3b7ae9c3a151f7070f8 (patch)
treea917de50059e3335fd41e030ebeba1fc2b8365b4 /source3
parent4f7e6108bdbb6da29f7d75851e3be5c4567b6fb0 (diff)
downloadsamba-78a4f6fc4b8938fcab5bb3b7ae9c3a151f7070f8.tar.gz
samba-78a4f6fc4b8938fcab5bb3b7ae9c3a151f7070f8.tar.bz2
samba-78a4f6fc4b8938fcab5bb3b7ae9c3a151f7070f8.zip
More fixes for debug log to catch logic error.
Jeremy. (This used to be commit 84a7714eba801fefa7ad56493f20813de3943bc5)
Diffstat (limited to 'source3')
-rw-r--r--source3/locking/locking.c2
-rw-r--r--source3/smbd/open.c12
2 files changed, 6 insertions, 8 deletions
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 1b40187ac4..1a5757f817 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -375,7 +375,7 @@ void unlock_share_entry_fsp(files_struct *fsp)
Print out a share mode.
********************************************************************/
-static char *share_mode_str(int num, share_mode_entry *e)
+char *share_mode_str(int num, share_mode_entry *e)
{
static pstring share_str;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 55fbee372c..15171ce9e3 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -534,7 +534,7 @@ existing desired access (0x%x).\n", fname, (unsigned int)desired_access, (unsign
#if defined(DEVELOPER)
-static void validate_my_share_entries(share_mode_entry *share_entry)
+static void validate_my_share_entries(int num, share_mode_entry *share_entry)
{
files_struct *fsp;
@@ -543,15 +543,13 @@ static void validate_my_share_entries(share_mode_entry *share_entry)
fsp = file_find_dif(share_entry->dev, share_entry->inode, share_entry->share_file_id);
if (!fsp) {
- pstring str;
- slprintf(str, sizeof(str)-1, "validate_my_share_entries: Cannot match a share entry with an open file \
-dev = %x, inode = %.0f file_id = %u\n", (unsigned int)share_entry->dev, (double)share_entry->inode,
- (unsigned int)share_entry->share_file_id );
- smb_panic(str);
+ DEBUG(0,("validate_my_share_entries: PANIC : %s\n", share_mode_str(num, share_entry) ));
+ smb_panic("validate_my_share_entries: Cannot match a share entry with an open file\n");
}
if (((uint16)fsp->oplock_type) != share_entry->op_type) {
pstring str;
+ DEBUG(0,("validate_my_share_entries: PANIC : %s\n", share_mode_str(num, share_entry) ));
slprintf(str, sizeof(str)-1, "validate_my_share_entries: file %s, oplock_type = 0x%x, op_type = 0x%x\n",
fsp->fsp_name, (unsigned int)fsp->oplock_type, (unsigned int)share_entry->op_type );
smb_panic(str);
@@ -600,7 +598,7 @@ static int open_mode_check(connection_struct *conn, const char *fname, SMB_DEV_T
share_mode_entry *share_entry = &old_shares[i];
#if defined(DEVELOPER)
- validate_my_share_entries(share_entry);
+ validate_my_share_entries(i, share_entry);
#endif
/*