diff --git a/lib/hawk.h b/lib/hawk.h index 9e454f39..054a9365 100644 --- a/lib/hawk.h +++ b/lib/hawk.h @@ -2760,8 +2760,8 @@ HAWK_EXPORT int hawk_rtx_truncrec ( * is a nil value. */ HAWK_EXPORT int hawk_rtx_isnilval ( - hawk_rtx_t* rtx, - hawk_val_t* val + hawk_rtx_t* rtx, + const hawk_val_t* val ); /** diff --git a/lib/mod-sys.c b/lib/mod-sys.c index 81600370..bd8875bb 100644 --- a/lib/mod-sys.c +++ b/lib/mod-sys.c @@ -123,7 +123,8 @@ typedef enum syslog_type_t syslog_type_t; enum syslog_type_t { SYSLOG_LOCAL, - SYSLOG_REMOTE + SYSLOG_DEVLOG, + SYSLOG_REMOTE, }; struct mod_ctx_t @@ -4605,8 +4606,14 @@ static int fnc_openlog (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) } else if (hawk_comp_oocstr_limited(ident, HAWK_T("local://"), 8, 0) == 0) { - /* "local://syslog-identifier" */ + /* local://syslog-identifier */ actual_ident = ident + 8; + } + else if (hawk_comp_oocstr_limited(ident, HAWK_T("devlog://"), 9, 0) == 0) + { + /* devlog://syslog-identifier */ + actual_ident = ident + 9; + log_type = SYSLOG_DEVLOG; } else { diff --git a/lib/val.c b/lib/val.c index e14f8376..fd637e3f 100644 --- a/lib/val.c +++ b/lib/val.c @@ -477,7 +477,7 @@ hawk_val_t* hawk_get_nil_val (void) return (hawk_val_t*)&hawk_nil; } -int hawk_rtx_isnilval (hawk_rtx_t* rtx, hawk_val_t* val) +int hawk_rtx_isnilval (hawk_rtx_t* rtx, const hawk_val_t* val) { return val == (hawk_val_t*)&hawk_nil || (HAWK_VTR_IS_POINTER(val) && val->v_type == HAWK_VAL_NIL); } diff --git a/mod/mod-mysql.c b/mod/mod-mysql.c index 3ffe948e..700b41cc 100644 --- a/mod/mod-mysql.c +++ b/mod/mod-mysql.c @@ -360,7 +360,7 @@ BEGIN { print "stmt preparation error - ", mysql::errmsg(); } - result = mysql::stmt_execute(stmt, "%hawk%"); + result = mysql::stmt_execute(stmt, mysql::TYPE_STR, "%hawk%"); if (result <= -1) { print "statement execution error - ", mysql::errmsg();