| 1606 | } |
| 1607 | |
| 1608 | char * call::send_scene(int index, int *send_status, int *len) |
| 1609 | { |
| 1610 | #define MAX_MSG_NAME_SIZE 30 |
| 1611 | static char msg_name[MAX_MSG_NAME_SIZE]; |
| 1612 | char *L_ptr1 ; |
| 1613 | char *L_ptr2 ; |
| 1614 | int uselen = 0; |
| 1615 | |
| 1616 | assert(send_status); |
| 1617 | |
| 1618 | /* Socket port must be known before string substitution */ |
| 1619 | if (!connect_socket_if_needed()) { |
| 1620 | *send_status = -2; |
| 1621 | return nullptr; |
| 1622 | } |
| 1623 | |
| 1624 | assert(call_socket); |
| 1625 | |
| 1626 | assert(call_scenario->messages[index]->send_scheme); |
| 1627 | |
| 1628 | if (!len) { |
| 1629 | len = &uselen; |
| 1630 | } |
| 1631 | |
| 1632 | char * dest; |
| 1633 | dest = createSendingMessage(call_scenario->messages[index]->send_scheme, index, len); |
| 1634 | |
| 1635 | if (!dest) { |
| 1636 | *send_status = -2; |
| 1637 | return nullptr; |
| 1638 | } |
| 1639 | |
| 1640 | L_ptr1=msg_name ; |
| 1641 | L_ptr2=dest ; |
| 1642 | while ((*L_ptr2 != ' ') && (*L_ptr2 != '\n') && (*L_ptr2 != '\t')) { |
| 1643 | *L_ptr1 = *L_ptr2; |
| 1644 | L_ptr1 ++; |
| 1645 | L_ptr2 ++; |
| 1646 | } |
| 1647 | *L_ptr1 = '\0' ; |
| 1648 | |
| 1649 | if (strcmp(msg_name, "ACK") == 0) { |
| 1650 | call_established = true ; |
| 1651 | ack_is_pending = false ; |
| 1652 | } |
| 1653 | |
| 1654 | *send_status = send_raw(dest, index, *len); |
| 1655 | |
| 1656 | return dest; |
| 1657 | } |
| 1658 | |
| 1659 | void call::do_bookkeeping(message *curmsg) |
| 1660 | { |
nothing calls this directly
no outgoing calls
no test coverage detected