MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / dm_drop_pending_reply_cond

Function dm_drop_pending_reply_cond

modules/aaa_diameter/dm_impl.c:868–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868int dm_drop_pending_reply_cond(struct dm_cond *reply_cond)
869{
870 struct dm_find_cond_ctx ctx;
871 unsigned int hentry;
872
873 if (!reply_cond)
874 return 0;
875
876 for (hentry = 0; hentry < hash_size(pending_replies); hentry++) {
877 memset(&ctx, 0, sizeof ctx);
878 ctx.cond = reply_cond;
879
880 hash_lock(pending_replies, hentry);
881 map_for_each(pending_replies->entries[hentry], dm_match_pending_cond, &ctx);
882 if (!ctx.found) {
883 hash_unlock(pending_replies, hentry);
884 continue;
885 }
886
887 hash_remove(pending_replies, hentry, ctx.key);
888 hash_unlock(pending_replies, hentry);
889 return 1;
890 }
891
892 return 0;
893}
894
895
896

Callers 1

Calls 1

map_for_eachFunction · 0.85

Tested by

no test coverage detected