From b2ca9fb81abff19e43389706333360a01facac5c Mon Sep 17 00:00:00 2001 From: trimill Date: Thu, 14 Dec 2023 13:05:17 -0500 Subject: [PATCH] a --- teld.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/teld.c b/teld.c index 5bef42a..bf5ebe5 100644 --- a/teld.c +++ b/teld.c @@ -157,6 +157,7 @@ void client_pickup(struct call_buf *call_buf, int stream) { union tel_sa_any remote_addr; socklen_t remote_addr_len = sizeof(union tel_sa_any); res = tel_read_sockaddr(stream, &remote_addr, &remote_addr_len); + if(res < 0) goto err; int idx = call_buf_search(call_buf, &remote_addr); if(idx < 0) { @@ -175,6 +176,10 @@ void client_pickup(struct call_buf *call_buf, int stream) { }; close(fd); return; + +err: + printf("error picking up call: %s\n", strerror(errno)); + tel_write_err(stream, strerror(errno)); } void client_call(int stream, struct config cfg) {