mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-12 19:33:03 +00:00
Fixed debug output
This commit is contained in:
parent
e04fb76a49
commit
5cce57cbd8
20
src/elogd.c
20
src/elogd.c
@ -28120,12 +28120,14 @@ int process_http_request(const char *request, int i_conn)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (get_verbose() < VERBOSE_DEBUG) {
|
if (get_verbose() < VERBOSE_DEBUG) {
|
||||||
strlcpy(str, request, sizeof(str));
|
if (get_verbose() > 0) {
|
||||||
if (strchr(str, '\r'))
|
strlcpy(str, request, sizeof(str));
|
||||||
*strchr(str, '\r') = 0;
|
if (strchr(str, '\r'))
|
||||||
if (strchr(str, '\n'))
|
*strchr(str, '\r') = 0;
|
||||||
*strchr(str, '\n') = 0;
|
if (strchr(str, '\n'))
|
||||||
eputs(str);
|
*strchr(str, '\n') = 0;
|
||||||
|
eputs(str);
|
||||||
|
}
|
||||||
} else if (get_verbose() >= VERBOSE_DEBUG) {
|
} else if (get_verbose() >= VERBOSE_DEBUG) {
|
||||||
eputs("\n");
|
eputs("\n");
|
||||||
eputs(request);
|
eputs(request);
|
||||||
@ -28680,7 +28682,8 @@ void send_return(int _sock, const char *net_buffer)
|
|||||||
send(_sock, p + 4, length, 0);
|
send(_sock, p + 4, length, 0);
|
||||||
#endif
|
#endif
|
||||||
if (get_verbose() < VERBOSE_DEBUG) {
|
if (get_verbose() < VERBOSE_DEBUG) {
|
||||||
eprintf("Returned %d bytes\n", length);
|
if (get_verbose() > 0)
|
||||||
|
eprintf("Returned %d bytes\n", length);
|
||||||
} else if (get_verbose() >= VERBOSE_DEBUG) {
|
} else if (get_verbose() >= VERBOSE_DEBUG) {
|
||||||
if (strrchr(net_buffer, '/'))
|
if (strrchr(net_buffer, '/'))
|
||||||
strlcpy(str, strrchr(net_buffer, '/') + 1, sizeof(str));
|
strlcpy(str, strrchr(net_buffer, '/') + 1, sizeof(str));
|
||||||
@ -28736,7 +28739,8 @@ void send_return(int _sock, const char *net_buffer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (get_verbose() < VERBOSE_DEBUG) {
|
if (get_verbose() < VERBOSE_DEBUG) {
|
||||||
eprintf("Returned %d bytes\n", return_length);
|
if (get_verbose() > 0)
|
||||||
|
eprintf("Returned %d bytes\n", return_length);
|
||||||
} else if (get_verbose() == VERBOSE_DEBUG) {
|
} else if (get_verbose() == VERBOSE_DEBUG) {
|
||||||
if (strrchr(net_buffer, '/'))
|
if (strrchr(net_buffer, '/'))
|
||||||
strlcpy(str, strrchr(net_buffer, '/') + 1, sizeof(str));
|
strlcpy(str, strrchr(net_buffer, '/') + 1, sizeof(str));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user