"the_lock_id" is not required here. The share mode data carry the file
id, so use that.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
* talloc_reference.
*/
static struct share_mode_lock *the_lock;
-static struct file_id the_lock_id;
static int the_lock_destructor(struct share_mode_lock *l)
{
the_lock = NULL;
- ZERO_STRUCT(the_lock_id);
return 0;
}
goto fail;
}
talloc_set_destructor(the_lock, the_lock_destructor);
- the_lock_id = id;
} else {
- if (!file_id_equal(&the_lock_id, &id)) {
+ if (!file_id_equal(&the_lock->data->id, &id)) {
DEBUG(1, ("Can not lock two share modes "
"simultaneously\n"));
goto fail;