Merge in SNORT/snort3 from ~VIIZHYK/snort3:controlcon_log to master
Squashed commit of the following:
commit
8fde0b7a2381b41adc6b07b9b8378be7b342d227
Author: viizhyk <viizhyk@cisco.com>
Date: Fri Dec 13 04:39:48 2024 -0500
appid: Enhanced control error message with additional info.
bool ControlConn::respond(const char* format, va_list& ap)
{
+ if (is_closed() or is_removed())
+ return false;
+
char buf[STD_BUF];
int response_len = vsnprintf(buf, sizeof(buf), format, ap);
if (errno != EAGAIN && errno != EINTR)
{
shutdown();
- ErrorMessage("ControlConn: Error in writing response, closing the connection: %s\n", get_error(errno));
+ ErrorMessage("ControlConn: Error in writing response, closing the connection: %s, buf: %s\n", get_error(errno), buf);
return false;
}
}