| 1294 | } |
| 1295 | |
| 1296 | int 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 | |
| 1325 | int cmd_send_rpl(struct sip_msg *msg, int *cluster_id, int *node_id, |
| 1326 | str *gen_msg, pv_spec_t *param_tag) |
nothing calls this directly
no test coverage detected