| 826 | |
| 827 | |
| 828 | int dm_add_pending_reply(const str *callid, struct dm_cond *reply_cond) |
| 829 | { |
| 830 | struct dm_cond **cond_holder; |
| 831 | unsigned int hentry; |
| 832 | |
| 833 | hentry = hash_entry(pending_replies, *callid); |
| 834 | hash_lock(pending_replies, hentry); |
| 835 | |
| 836 | cond_holder = (struct dm_cond **)hash_get(pending_replies, hentry, *callid); |
| 837 | if (!cond_holder) { |
| 838 | hash_unlock(pending_replies, hentry); |
| 839 | LM_ERR("oom\n"); |
| 840 | return -1; |
| 841 | } |
| 842 | |
| 843 | *cond_holder = reply_cond; |
| 844 | dm_cond_ref(reply_cond); |
| 845 | hash_unlock(pending_replies, hentry); |
| 846 | |
| 847 | return 0; |
| 848 | } |
| 849 | |
| 850 | struct dm_find_cond_ctx { |
| 851 | struct dm_cond *cond; |
no test coverage detected