|
@@ -1270,8 +1270,7 @@ int uldb_preload_attrs(udomain_t *_d)
|
|
suri = user;
|
|
suri = user;
|
|
}
|
|
}
|
|
|
|
|
|
- lock_udomain(_d, &suri);
|
|
|
|
- if (get_urecord_by_ruid(_d, ul_get_aorhash(&suri), &ruid, &r, &c) > 0) {
|
|
|
|
|
|
+ if (get_urecord_by_ruid(_d, ul_get_aorhash(&suri), &ruid, &r, &c) < 0) {
|
|
/* delete attrs records from db table */
|
|
/* delete attrs records from db table */
|
|
LM_INFO("no contact record for this ruid\n");
|
|
LM_INFO("no contact record for this ruid\n");
|
|
uldb_delete_attrs(_d->name, &user, &domain, &ruid);
|
|
uldb_delete_attrs(_d->name, &user, &domain, &ruid);
|
|
@@ -1287,8 +1286,9 @@ int uldb_preload_attrs(udomain_t *_d)
|
|
LM_INFO("cannot add values to contact xavp\n");
|
|
LM_INFO("cannot add values to contact xavp\n");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ /* get_urecord_by_ruid() locks the slot */
|
|
|
|
+ unlock_udomain(_d, &suri);
|
|
}
|
|
}
|
|
- unlock_udomain(_d, &user);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
if (DB_CAPABILITY(ul_dbf, DB_CAP_FETCH)) {
|
|
if (DB_CAPABILITY(ul_dbf, DB_CAP_FETCH)) {
|