* pqPutMsgBytes: add bytes to a partially-constructed message * * Returns 0 on success, EOF on error */
| 535 | * Returns 0 on success, EOF on error |
| 536 | */ |
| 537 | static int |
| 538 | pqPutMsgBytes(const void *buf, size_t len, PGconn *conn) |
| 539 | { |
| 540 | /* make sure there is room for it */ |
| 541 | if (pqCheckOutBufferSpace(conn->outMsgEnd + len, conn)) |
| 542 | return EOF; |
| 543 | /* okay, save the data */ |
| 544 | memcpy(conn->outBuffer + conn->outMsgEnd, buf, len); |
| 545 | conn->outMsgEnd += len; |
| 546 | /* no Pfdebug call here, caller should do it */ |
| 547 | return 0; |
| 548 | } |
| 549 | |
| 550 | /** |
| 551 | * Same as pqPutMsgEnd except that data is NEVER flushed. |
no test coverage detected