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

Function cmd_send_req

modules/clusterer/clusterer_mod.c:1296–1323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1294}
1295
1296int cmd_send_req(struct sip_msg *msg, int *cluster_id, int *node_id,
1297 str *gen_msg, pv_spec_t *param_tag)
1298{
1299 pv_value_t tag_val;
1300 int rc;
1301
1302 /* generate tag */
1303 generate_msg_tag(&tag_val, *cluster_id);
1304
1305 if (param_tag && pv_set_value(msg, param_tag, 0, &tag_val) < 0) {
1306 LM_ERR("Unable to set tag pvar\n");
1307 return -1;
1308 }
1309
1310 rc = send_gen_msg(*cluster_id, *node_id, gen_msg, &tag_val.rs, 1);
1311 switch (rc) {
1312 case 0:
1313 return 1;
1314 case 1:
1315 return -1;
1316 case -1:
1317 return -2;
1318 case -2:
1319 return -3;
1320 default:
1321 return -3;
1322 }
1323}
1324
1325int cmd_send_rpl(struct sip_msg *msg, int *cluster_id, int *node_id,
1326 str *gen_msg, pv_spec_t *param_tag)

Callers

nothing calls this directly

Calls 3

generate_msg_tagFunction · 0.85
pv_set_valueFunction · 0.85
send_gen_msgFunction · 0.85

Tested by

no test coverage detected