| 515 | ////////////////////////////////////////////////////////////////////////////// |
| 516 | |
| 517 | static ClientTxn * |
| 518 | synclient_txn_create() |
| 519 | { |
| 520 | const HttpProxyPort *proxy_port; |
| 521 | |
| 522 | ClientTxn *txn = static_cast<ClientTxn *>(TSmalloc(sizeof(ClientTxn))); |
| 523 | |
| 524 | ink_zero(*txn); |
| 525 | |
| 526 | if (nullptr == (proxy_port = HttpProxyPort::findHttp(AF_INET))) { |
| 527 | txn->connect_port = PROXY_HTTP_DEFAULT_PORT; |
| 528 | } else { |
| 529 | txn->connect_port = proxy_port->m_port; |
| 530 | } |
| 531 | |
| 532 | txn->connect_ip = IP(127, 0, 0, 1); |
| 533 | txn->status = REQUEST_INPROGRESS; |
| 534 | txn->magic = MAGIC_ALIVE; |
| 535 | |
| 536 | Dbg(dbg_ctl_SockClient, "Connecting to proxy 127.0.0.1 on port %d", txn->connect_port); |
| 537 | return txn; |
| 538 | } |
| 539 | |
| 540 | static int |
| 541 | synclient_txn_delete(ClientTxn *txn) |
no test coverage detected