summaryrefslogtreecommitdiff
path: root/src/mod_cml_funcs.c
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-07-07 22:39:14 +0000
committerJan Kneschke <jan@kneschke.de>2005-07-07 22:39:14 +0000
commit6d60bcb0400d5952719782cba88b0462adf4cc17 (patch)
tree1eed48bb2e8fe308a0fe58e24064f33218c8d9da /src/mod_cml_funcs.c
parent3c383fe3df48d091428095053c09720a150cc683 (diff)
downloadlighttpd-git-6d60bcb0400d5952719782cba88b0462adf4cc17.tar.gz
use log_* functions for debugging and don't segfault on evaluation
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@428 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_cml_funcs.c')
-rw-r--r--src/mod_cml_funcs.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mod_cml_funcs.c b/src/mod_cml_funcs.c
index e8a8d955..9988975f 100644
--- a/src/mod_cml_funcs.c
+++ b/src/mod_cml_funcs.c
@@ -33,8 +33,9 @@ CACHE_FUNC_PROTO(f_file_mtime) {
UNUSED(con);
if (p->params->ptr[0]->type != T_NODE_VALUE_STRING) {
- fprintf(stderr, "%s.%d: f_file_mtime: I need a string: %d\n",
- __FILE__, __LINE__, p->params->ptr[0]->type);
+ log_error_write(srv, __FILE__, __LINE__, "sd",
+ "f_file_mtime: I need a string:",
+ p->params->ptr[0]->type);
return -1;
}
@@ -46,7 +47,8 @@ CACHE_FUNC_PROTO(f_file_mtime) {
buffer_append_string_buffer(b, p->params->ptr[0]->data.str);
if (-1 == stat(b->ptr, &st)) {
- log_error_write(srv, __FILE__, __LINE__, "sbs", "trigger.if file.mtime():", b, strerror(errno));
+ log_error_write(srv, __FILE__, __LINE__, "sbs",
+ "trigger.if file.mtime():", b, strerror(errno));
buffer_free(b);
return -1;
@@ -64,8 +66,9 @@ CACHE_FUNC_PROTO(f_mysql_escape) {
UNUSED(con);
if (p->params->ptr[0]->type != T_NODE_VALUE_STRING) {
- fprintf(stderr, "%s.%d: f_mysql_escape: I need a string: %d\n",
- __FILE__, __LINE__, p->params->ptr[0]->type);
+ log_error_write(srv, __FILE__, __LINE__, "sd",
+ "f_mysql_escape: I need a string:",
+ p->params->ptr[0]->type);
return -1;
}
@@ -81,8 +84,9 @@ CACHE_FUNC_PROTO(f_mysql_query) {
UNUSED(con);
if (p->params->ptr[0]->type != T_NODE_VALUE_STRING) {
- fprintf(stderr, "%s.%d: f_mysql_escape: I need a string: %d\n",
- __FILE__, __LINE__, p->params->ptr[0]->type);
+ log_error_write(srv, __FILE__, __LINE__, "sd",
+ "f_mysql_query: I need a string:",
+ p->params->ptr[0]->type);
return -1;
}