projects
/
psensor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fec81da
)
use log_err instead of printf
author
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 30 Apr 2012 07:39:48 +0000
(07:39 +0000)
committer
Jean-Philippe Orsini
<jeanfi@gmail.com>
Mon, 30 Apr 2012 07:39:48 +0000
(07:39 +0000)
src/server/server.c
patch
|
blob
|
history
diff --git
a/src/server/server.c
b/src/server/server.c
index
32b3cfd
..
f344ab8
100644
(file)
--- a/
src/server/server.c
+++ b/
src/server/server.c
@@
-227,7
+227,7
@@
create_response_file(const char *nurl,
(MHD_ContentReaderFreeCallback)&fclose);
} else {
(MHD_ContentReaderFreeCallback)&fclose);
} else {
- log_
printf(LOG_ERR, "Failed to open: %s\n
", fpath);
+ log_
err("Failed to open: %s.
", fpath);
}
}
}
}
@@
-383,14
+383,14
@@
int main(int argc, char *argv[])
#endif
if (!*server_data.sensors)
#endif
if (!*server_data.sensors)
-
fprintf(stderr, _("ERROR: no sensors detected\n
"));
+
log_err(_("No sensors detected.
"));
d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION,
port,
NULL, NULL, &cbk_http_request, server_data.sensors,
MHD_OPTION_END);
if (!d) {
d = MHD_start_daemon(MHD_USE_THREAD_PER_CONNECTION,
port,
NULL, NULL, &cbk_http_request, server_data.sensors,
MHD_OPTION_END);
if (!d) {
-
fprintf(stderr, _("ERROR: Fail to create web server\n
"));
+
log_err(_("Failed to create Web server.
"));
exit(EXIT_FAILURE);
}
exit(EXIT_FAILURE);
}