Print out a share mode.
********************************************************************/
-char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e)
+char *share_mode_str(TALLOC_CTX *ctx, int num,
+ const struct file_id *id,
+ const struct share_mode_entry *e)
{
struct server_id_buf tmp;
e->access_mask, (unsigned long long)e->op_mid,
e->op_type, (unsigned long long)e->share_file_id,
(unsigned int)e->uid, (unsigned int)e->flags,
- file_id_string_tos(&e->id),
+ file_id_string_tos(id),
(unsigned int)e->name_hash);
}
bool locking_init(void);
bool locking_init_readonly(void);
bool locking_end(void);
-char *share_mode_str(TALLOC_CTX *ctx, int num, const struct share_mode_entry *e);
+char *share_mode_str(TALLOC_CTX *ctx, int num,
+ const struct file_id *id,
+ const struct share_mode_entry *e);
struct share_mode_lock *get_existing_share_mode_lock(TALLOC_CTX *mem_ctx,
struct file_id id);
struct share_mode_lock *get_share_mode_lock(
}
/* Ok - send the close message. */
- DEBUG(10,("enum_file_close_fn: request to close file %s, %s\n",
- sharepath,
- share_mode_str(talloc_tos(), 0, e) ));
+ DBG_DEBUG("request to close file %s, %s\n", sharepath,
+ share_mode_str(talloc_tos(), 0, &e->id, e));
share_mode_entry_to_message(msg, e);
message_to_share_mode_entry(&e, (char *)data->data);
if(DEBUGLVL(10)) {
- char *sm_str = share_mode_str(NULL, 0, &e);
+ char *sm_str = share_mode_str(NULL, 0, &e.id, &e);
if (!sm_str) {
smb_panic("talloc failed");
}
fsp = file_find_dif(sconn, share_entry->id,
share_entry->share_file_id);
if (!fsp) {
- DEBUG(0,("validate_my_share_entries: PANIC : %s\n",
- share_mode_str(talloc_tos(), num, share_entry) ));
+ DBG_ERR("PANIC : %s\n",
+ share_mode_str(talloc_tos(), num, &share_entry->id,
+ share_entry));
smb_panic("validate_my_share_entries: Cannot match a "
"share entry with an open file\n");
}
panic:
{
char *str;
- DEBUG(0,("validate_my_share_entries: PANIC : %s\n",
- share_mode_str(talloc_tos(), num, share_entry) ));
+ DBG_ERR("validate_my_share_entries: PANIC : %s\n",
+ share_mode_str(talloc_tos(), num, &share_entry->id,
+ share_entry));
str = talloc_asprintf(talloc_tos(),
"validate_my_share_entries: "
"file %s, oplock_type = 0x%x, op_type = 0x%x\n",