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

Function _dm_create_message

modules/aaa_diameter/dm_impl.c:1757–1788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1755}
1756
1757aaa_message *_dm_create_message(aaa_conn *_, int msg_type,
1758 unsigned int app_id, unsigned int cmd_code, void *fd_msg)
1759{
1760 aaa_message *m;
1761 struct dm_message *dm;
1762
1763 m = shm_malloc(sizeof *m);
1764 if (!m) {
1765 LM_ERR("oom\n");
1766 return NULL;
1767 }
1768 memset(m, 0, sizeof *m);
1769
1770 dm = shm_malloc(sizeof *dm);
1771 if (!dm) {
1772 shm_free(m);
1773 LM_ERR("oom\n");
1774 return NULL;
1775 }
1776 memset(dm, 0, sizeof *dm);
1777
1778 m->type = msg_type;
1779 m->avpair = (void *)dm;
1780
1781 INIT_LIST_HEAD(&dm->avps);
1782 dm->am = m;
1783 dm->app_id = app_id;
1784 dm->cmd_code = cmd_code;
1785 dm->fd_req = fd_msg;
1786
1787 return m;
1788}
1789
1790
1791aaa_message *dm_create_message(aaa_conn *_, int msg_type)

Callers 6

dm_create_messageFunction · 0.85
dm_api_send_reqFunction · 0.85
dm_api_send_req_asyncFunction · 0.85
dm_send_requestFunction · 0.85
dm_send_answerFunction · 0.85
dm_send_request_asyncFunction · 0.85

Calls 3

shm_mallocFunction · 0.85
shm_freeFunction · 0.85
INIT_LIST_HEADFunction · 0.85

Tested by

no test coverage detected