| 86 | } |
| 87 | |
| 88 | static 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 | |
| 116 | static int l_siplua_getType(lua_State *L) |
| 117 | { |
no test coverage detected