lnsocket

A minimal C library for connecting to the lightning network
git clone git://jb55.com/lnsocket
Log | Files | Refs | Submodules | README | LICENSE

commit a2dbada310e9850407ae82515b7cbda07b44d12b
parent 8ea374f8a5a53c4bf5067e512bb2ab8581f05a92
Author: William Casarin <jb55@jb55.com>
Date:   Tue,  7 Jun 2022 10:40:40 -0700

print to stderr for read error

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mhandshake.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/handshake.c b/handshake.c @@ -453,7 +453,7 @@ static int act_two_initiator(struct lnsocket *ln, struct handshake *h) ssize_t size; if ((size = read(ln->socket, &h->act2, ACT_TWO_SIZE)) != ACT_TWO_SIZE) { - printf("read %ld bytes, expected %d\n", size, ACT_TWO_SIZE); + fprintf(stderr, "read %ld bytes, expected %d\n", size, ACT_TWO_SIZE); return note_error(&ln->errs, "%s", strerror(errno)); }