Commit e8665035 authored by Johannes Kanig's avatar Johannes Kanig
Browse files

minor do some more logging in why3 server code

parent 2b016217
......@@ -25,6 +25,14 @@ void init_logging() {
void log_msg(char* s) {
if (logging) {
fprintf (logfile, "%s\n", s);
fflush (logfile);
}
}
void log_msg_len(char* s, int len) {
if (logging) {
fprintf (logfile, "%.*s\n", len, s);
fflush (logfile);
}
}
......
......@@ -15,6 +15,7 @@
void init_logging();
void log_msg(char* s);
void log_msg_len(char* s, int len);
void logging_shutdown(char* s);
#endif
......
......@@ -14,6 +14,7 @@
#include <string.h>
#include "request.h"
#include "options.h"
#include "logging.h"
//count the semicolons in <buf>, up to <len>
int count_semicolons(char* buf, int len);
......@@ -62,6 +63,9 @@ prequest parse_request(char* str_req, int len, int key) {
char* tmp;
bool runstdin = false;
log_msg("received query");
log_msg_len(str_req, len);
semic = count_semicolons(str_req, len);
if (semic == 0) {
return NULL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment