Module: kamailio Branch: master Commit: 9390f90aadcce5c70bbd9b7edc1f1f1ff3706594 URL: https://github.com/kamailio/kamailio/commit/9390f90aadcce5c70bbd9b7edc1f1f1ff3706594
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-06-06T08:32:33+02:00 evapi: drain unknown client socket using local buffer --- Modified: src/modules/evapi/evapi_dispatch.c --- Diff: https://github.com/kamailio/kamailio/commit/9390f90aadcce5c70bbd9b7edc1f1f1ff3706594.diff Patch: https://github.com/kamailio/kamailio/commit/9390f90aadcce5c70bbd9b7edc1f1f1ff3706594.patch --- diff --git a/src/modules/evapi/evapi_dispatch.c b/src/modules/evapi/evapi_dispatch.c index efae236bdbf..823279bac64 100644 --- a/src/modules/evapi/evapi_dispatch.c +++ b/src/modules/evapi/evapi_dispatch.c @@ -546,6 +546,7 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher, int revents) str frame; char *sfp; char *efp; + char drainbuf[CLIENT_BUFFER_SIZE]; if(EV_ERROR & revents) { LM_ERR("received invalid event (%d)\n", revents); @@ -565,8 +566,7 @@ void evapi_recv_client(struct ev_loop *loop, struct ev_io *watcher, int revents) if(i == EVAPI_MAX_CLIENTS) { LM_ERR("cannot lookup client socket %d\n", watcher->fd); /* try to empty the socket anyhow */ - rlen = recv(watcher->fd, _evapi_clients[i].rbuffer, - CLIENT_BUFFER_SIZE - 1, 0); + rlen = recv(watcher->fd, drainbuf, sizeof(drainbuf) - 1, 0); return; } _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
