Hi:
See lock_hash in h_table.c:
Flowing lines of code do not guarantee atomicity and I think it is not safe:
- atomic_get(&_tm_table->entries[i].locker_pid) != mypid
- lock(&_tm_table->entries[i].mutex)
- atomic_set(&_tm_table->entries[i].locker_pid, mypid)
Would you mind solving my confusion?
Hi:
See dlg_new_dialog in dlg_handlers.c.
After dlg_search, the dlg has locked and referenced, but there is no dlg_hash_release/dlg_release in some places ?
Hi all
I want the syslog output in json structure. When I run 'kamailio
--log-engine=json:M' I am getting this but only for that command.I want all
syslog out in the json format. Any one please help me to achieve this
Thanks & Regards
Jeetha P J
--
_This message contains information that may be privileged or confidential
and is the property of the Quantiphi Inc and/or its affiliates_. It is
intended only for the person to whom it is addressed. _If you are not the
intended recipient, any review, dissemination, distribution, copying,
storage or other use of all or any portion of this message is strictly
prohibited. If you received this message in error, please immediately
notify the sender by reply e-mail and delete this message in its
*entirety*___
Hi:
See dlg_new_dialog in dlg_handlers.c.
After dlg_search, the dlg has locked and referenced, but there is no dlg_hash_release/dlg_release in some places ?
Best Regards!
### Description
See `lock_hash` in `h_table.c`:
```C
void lock_hash(int i)
{
int mypid;
mypid = my_pid();
if (likely(atomic_get(&_tm_table->entries[i].locker_pid) != mypid)) {
lock(&_tm_table->entries[i].mutex);
atomic_set(&_tm_table->entries[i].locker_pid, mypid);
} else {
/* locked within the same process that called us*/
_tm_table->entries[i].rec_lock_level++;
}
}
```
Flowing lines of code do not guarantee atomicity and I think it is not safe:
* atomic_get(&_tm_table->entries[i].locker_pid) != mypid
* lock(&_tm_table->entries[i].mutex)
* atomic_set(&_tm_table->entries[i].locker_pid, mypid)
Would you mind solving my confusion?
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3083
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3083(a)github.com>