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

Function send_resp

modules/auth/common.c:78–92  ·  view source on GitHub ↗

* Create a response with given code and reason phrase * Optionally add new headers specified in hdrs */

Source from the content-addressed store, hash-verified

76 * Optionally add new headers specified in hdrs
77 */
78int send_resp(struct sip_msg* _m, int _code, const str* _reason,
79 const str hdrs[], int nhdrs)
80{
81 int i;
82
83 /* Add new headers if there are any */
84 for (i = 0; i < nhdrs; i++) {
85 if (add_lump_rpl( _m, hdrs[i].s, hdrs[i].len, LUMP_RPL_HDR)==0) {
86 LM_ERR("unable to append hdr\n");
87 return -1;
88 }
89 }
90
91 return sigb.reply(_m, _code, (_reason?_reason:_str(error_text(_code))), NULL);
92}

Callers 2

pre_authFunction · 0.85
challengeFunction · 0.85

Calls 3

add_lump_rplFunction · 0.85
_strClass · 0.85
error_textFunction · 0.85

Tested by

no test coverage detected