Added DEBUG in set_share_mode to track down logic insanity.
authorJeremy Allison <jra@samba.org>
Sat, 5 Jan 2002 02:37:23 +0000 (02:37 +0000)
committerJeremy Allison <jra@samba.org>
Sat, 5 Jan 2002 02:37:23 +0000 (02:37 +0000)
Jeremy.
(This used to be commit 32f4f3a45d473b3be1ae07f6c60897c12323d60c)

source3/locking/locking.c

index cb523532d8f4c118114f6751a962a9cd00e517d3..0eca0b61bcd7ffad93424fb82b8ea6a81aa918dd 100644 (file)
@@ -552,6 +552,10 @@ BOOL set_share_mode(files_struct *fsp, uint16 port, uint16 op_type)
                        return False;
                data = (struct locking_data *)p;
                data->u.num_share_mode_entries = 1;
+       
+               DEBUG(10,("set_share_mode: creating entry for file %s. num_share_modes = 1\n",
+                       fsp->fsp_name ));
+
                pstrcpy(p + sizeof(*data) + sizeof(share_mode_entry), fname);
                fill_share_mode(p + sizeof(*data), fsp, port, op_type);
                dbuf.dptr = p;
@@ -566,6 +570,10 @@ BOOL set_share_mode(files_struct *fsp, uint16 port, uint16 op_type)
        data = (struct locking_data *)dbuf.dptr;
 
        data->u.num_share_mode_entries++;
+       
+       DEBUG(10,("set_share_mode: adding entry for file %s. new num_share_modes = %d\n",
+               fsp->fsp_name, data->u.num_share_mode_entries ));
+
        size = dbuf.dsize + sizeof(share_mode_entry);
        p = malloc(size);
        if (!p)