shm mod BUGFIX clear even SID on failed lock
Fixes
@@ -506,8 +506,11 @@ sr_shmmod_modinfo_rdlock_upgrade(struct sr_mod_info_s *mod_info, sr_sid_t sid)
/* MOD WRITE LOCK */
if ((err_info = sr_shmmod_lock(mod->ly_mod->name, shm_lock, SR_MOD_LOCK_TIMEOUT * 1000, SR_LOCK_WRITE, sid))) {
- /* clear the flag */
+ /* clear the lock */
shm_lock->write_locked = 0;
+ if (!shm_lock->ds_locked) {
+ memset(&shm_lock->sid, 0, sizeof shm_lock->sid);
+ }
return err_info;
}
mod->state |= MOD_INFO_WLOCK;
