int main(int argc, char *argv[]) { void (*mangler)(struct rfc822_msg *msg); plan_tests(3 * 1); foreach_ptr(mangler, mangle_list) { const char *buf; size_t len; struct rfc822_msg *msg, *check; buf = assemble_msg(&test_msg_1, &len, 0); msg = rfc822_start(NULL, buf, len); fprintf(stderr, "msg = %p\n", msg); ok1(msg != NULL); (void) rfc822_next_header(msg, NULL); check = rfc822_check(msg, NULL); fprintf(stderr, "check = %p (1)\n", check); ok1(check == msg); mangler(msg); check = rfc822_check(msg, NULL); fprintf(stderr, "check = %p (2)\n", check); ok1(check == NULL); } exit(exit_status()); }
int t_write_unix(struct sip_msg* msg, char* info, char* socket) { if (assemble_msg(msg, (struct tw_info*)info) < 0) { LM_ERR("failed to assemble_msg\n"); return -1; } if (write_to_unixsock(socket, TWRITE_PARAMS) == -1) { LM_ERR("write_to_unixsock failed\n"); return -1; } /* make sure that if voicemail does not initiate a reply * timely, a SIP timeout will be sent out */ if (add_blind_uac() == -1) { LM_ERR("add_blind failed\n"); return -1; } return 1; }
int t_write_req(struct sip_msg* msg, char* vm_fifo, char* info) { if (assemble_msg(msg, (struct tw_info*)info) < 0) { LOG(L_ERR, "ERROR:tm:t_write_req: Error int assemble_msg\n"); return -1; } if (write_to_fifo(vm_fifo, TWRITE_PARAMS) == -1) { LOG(L_ERR, "ERROR:tm:t_write_req: write_to_fifo failed\n"); return -1; } /* make sure that if voicemail does not initiate a reply * timely, a SIP timeout will be sent out */ if (add_blind_uac() == -1) { LOG(L_ERR, "ERROR:tm:t_write_req: add_blind failed\n"); return -1; } return 1; }