larsxschnei...@gmail.com writes:
> +int packet_write_gently(const int fd_out, const char *buf, size_t size)
> +{
> + static char packet_write_buffer[LARGE_PACKET_MAX];
> +
> + if (size > sizeof(packet_write_buffer) - 4) {
> + error("packet write failed");
> +
> On 08 Sep 2016, at 23:24, Stefan Beller wrote:
>
> On Thu, Sep 8, 2016 at 11:21 AM, wrote:
>
>>
>> Add packet_write_gently() which writes arbitrary data and returns `0`
>> for success and `-1` for an error.
>
> I think documenting the return
On Thu, Sep 8, 2016 at 11:21 AM, wrote:
> From: Lars Schneider
>
> packet_write_fmt_gently() uses format_packet() which lets the caller
> only send string data via "%s". That means it cannot be used for
> arbitrary data that may contain NULs.
From: Lars Schneider
packet_write_fmt_gently() uses format_packet() which lets the caller
only send string data via "%s". That means it cannot be used for
arbitrary data that may contain NULs.
Add packet_write_gently() which writes arbitrary data and returns `0`
for
4 matches
Mail list logo