diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-01-11 15:52:08 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-01-11 15:52:08 +0100 |
commit | adab7fc5a061624ad931fee4f95de09f78ace91d (patch) | |
tree | e6830f57e51334b11dd9ad78bced68eaa38fec07 /src/http.cc | |
parent | 6e2943c8f3befb0a560826e2d764dac1193bfdc1 (diff) |
Fix unobserve bug. Change more printf's into hugin syntax.
Diffstat (limited to 'src/http.cc')
-rw-r--r-- | src/http.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/http.cc b/src/http.cc index fe37d76..8aa83c3 100644 --- a/src/http.cc +++ b/src/http.cc @@ -30,6 +30,8 @@ #include <stdio.h> #include <string.h> +#include "hugin.hpp" + int callback_http(struct libwebsocket_context * context, struct libwebsocket *wsi, enum libwebsocket_callback_reasons reason, void *user, @@ -40,14 +42,14 @@ int callback_http(struct libwebsocket_context * context, switch(reason) { case LWS_CALLBACK_HTTP: - fprintf(stderr, "serving HTTP URI %s\n", (char *)in); + DEBUG(httpd,"serving HTTP URI %s\n", (char *)in); // // add favicon later if(in && strcmp((const char *)in, "/favicon.ico") == 0) { if(libwebsockets_serve_http_file(wsi, LOCAL_RESOURCE_PATH"/favicon.ico", "image/x-icon")) - fprintf(stderr, "Failed to send favicon\n"); + DEBUG(httpd,"Failed to send favicon\n"); break; } @@ -56,7 +58,7 @@ int callback_http(struct libwebsocket_context * context, if(libwebsockets_serve_http_file(wsi, LOCAL_RESOURCE_PATH"/proto.js", "text/javascript")) - fprintf(stderr, "Failed to send javascript\n"); + DEBUG(httpd,"Failed to send javascript\n"); break; } @@ -65,7 +67,7 @@ int callback_http(struct libwebsocket_context * context, if(libwebsockets_serve_http_file(wsi, LOCAL_RESOURCE_PATH"/munia.html", "text/html")) - fprintf(stderr, "Failed to send HTTP file\n"); + DEBUG(httpd,"Failed to send HTTP file\n"); break; /* @@ -82,8 +84,8 @@ int callback_http(struct libwebsocket_context * context, sizeof(client_name), client_ip, sizeof(client_ip)); - fprintf(stderr, "Received network connect from %s (%s)\n", - client_name, client_ip); + DEBUG(httpd,"Received network connect from %s (%s)\n", + client_name, client_ip); /* if we returned non-zero from here, we kill the connection */ break; |