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

Function sipapi_getExpires

modules/lua/sipapi.c:88–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88static int sipapi_getExpires(struct sip_msg *msg)
89{
90 exp_body_t *_p_expires;
91
92 if (parse_headers(msg, ~0, 0) < 0)
93 return -1;
94 if (!msg->expires || parse_expires(msg->expires) < 0)
95 return -1;
96 if (!msg->expires->parsed)
97 return -1;
98/* siplua_log(L_DBG, "Step 0"); */
99 if (msg->expires)
100 {
101/* siplua_log(L_DBG, "Step 1 %p", msg->expires->parsed); */
102 _p_expires = msg->expires->parsed;
103/* siplua_log(L_DBG, "Step 2 %p", _p_expires); */
104 if (_p_expires->valid)
105 {
106/* siplua_log(L_DBG, "Step 3"); */
107 return _p_expires->val;
108 }
109 else
110 return -1;
111 }
112 else
113 return -1;
114}
115
116static int l_siplua_getType(lua_State *L)
117{

Callers 2

l_siplua_getExpiresFunction · 0.85
l_siplua_getContactFunction · 0.85

Calls 1

parse_expiresFunction · 0.85

Tested by

no test coverage detected