From ca918af0ab4b56009aaafef9b48aabc00365b296 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 7 Jun 2013 17:07:41 -0400 Subject: [PATCH] [UDP-HTTP] Stop using OWLPS_DEBUG --- owlps-udp-to-http/owlps-udp-to-http.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/owlps-udp-to-http/owlps-udp-to-http.c b/owlps-udp-to-http/owlps-udp-to-http.c index f536c14..ce76212 100644 --- a/owlps-udp-to-http/owlps-udp-to-http.c +++ b/owlps-udp-to-http/owlps-udp-to-http.c @@ -79,6 +79,9 @@ char *program_name = NULL ; +// This needs to become an option when we introduce options +#define verbose true + results_list *results = NULL ; unsigned int nb_results = 0 ; sem_t lock_results ; @@ -329,18 +332,16 @@ void* tcp_server(void *NULL_value) } client_message[nbytes] = '\0' ; -#ifdef OWLPS_DEBUG - printf("Got a message from the client:\n" - "\"%s\"\n", client_message) ; -#endif // OWLPS_DEBUG + if (verbose) + printf("Got a message from the client:\n" + "\"%s\"\n", client_message) ; request_id = extract_request_from_message(client_request, client_message) ; prepare_answer(request_id) ; -#ifdef OWLPS_DEBUG - printf("Answer to send:\n\"%s\"\n", answer) ; -#endif // OWLPS_DEBUG + if (verbose) + printf("Answer to send:\n\"%s\"\n", answer) ; /* Send the answer */ nbytes = send(newsockfd, answer, answer_strlen, 0) ;