* Same as pqPutMsgEnd except that data is NEVER flushed. */
| 551 | * Same as pqPutMsgEnd except that data is NEVER flushed. |
| 552 | */ |
| 553 | void |
| 554 | pqPutMsgEndNoAutoFlush(PGconn *conn) |
| 555 | { |
| 556 | /* Fill in length word if needed */ |
| 557 | if (conn->outMsgStart >= 0) |
| 558 | { |
| 559 | uint32 msgLen = conn->outMsgEnd - conn->outMsgStart; |
| 560 | |
| 561 | msgLen = pg_hton32(msgLen); |
| 562 | memcpy(conn->outBuffer + conn->outMsgStart, &msgLen, 4); |
| 563 | } |
| 564 | |
| 565 | /* trace client-to-server message */ |
| 566 | if (conn->Pfdebug) |
| 567 | { |
| 568 | if (conn->outCount < conn->outMsgStart) |
| 569 | pqTraceOutputMessage(conn, conn->outBuffer + conn->outCount, true); |
| 570 | else |
| 571 | pqTraceOutputNoTypeByteMessage(conn, |
| 572 | conn->outBuffer + conn->outMsgStart); |
| 573 | } |
| 574 | |
| 575 | /* Make message eligible to send */ |
| 576 | conn->outCount = conn->outMsgEnd; |
| 577 | } |
| 578 | |
| 579 | /* |
| 580 | * pqPutMsgEnd: finish constructing a message and possibly send it |
no test coverage detected