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

Function mq_destroy

modules/mqueue/mqueue_api.c:61–95  ·  view source on GitHub ↗

* */

Source from the content-addressed store, hash-verified

59 *
60 */
61void mq_destroy(void)
62{
63 mq_head_t *mh = NULL;
64 mq_pv_t *mp = NULL;
65 mq_item_t *mi = NULL;
66 mq_head_t *mh1 = NULL;
67 mq_pv_t *mp1 = NULL;
68 mq_item_t *mi1 = NULL;
69
70 mh = _mq_head_list;
71 while(mh != NULL) {
72 if(mh->dbmode == 1 || mh->dbmode == 3) {
73 LM_INFO("mqueue[%.*s] dbmode[%d]\n", mh->name.len, mh->name.s,
74 mh->dbmode);
75 mqueue_db_save_queue(&mh->name);
76 }
77 mi = mh->ifirst;
78 while(mi != NULL) {
79 mi1 = mi;
80 mi = mi->next;
81 shm_free(mi1);
82 }
83 mh1 = mh;
84 mh = mh->next;
85 lock_destroy(&mh1->lock);
86 shm_free(mh1);
87 }
88 _mq_head_list = 0;
89 mp = _mq_pv_list;
90 while(mp != NULL) {
91 mp1 = mp;
92 mp = mp->next;
93 pkg_free(mp1);
94 }
95}
96
97/**
98 *

Callers 1

mod_destroyFunction · 0.85

Calls 3

mqueue_db_save_queueFunction · 0.85
shm_freeFunction · 0.85
lock_destroyFunction · 0.85

Tested by

no test coverage detected