mirror of
https://github.com/NLnetLabs/unbound.git
synced 2024-09-21 14:47:09 +00:00
- Fix #333: Unbound Segmentation Fault w/ log_info Functions From
Python Mod.
This commit is contained in:
parent
0272889c44
commit
ca39cfd6ae
@ -1,3 +1,7 @@
|
|||||||
|
22 October 2020: Wouter
|
||||||
|
- Fix #333: Unbound Segmentation Fault w/ log_info Functions From
|
||||||
|
Python Mod.
|
||||||
|
|
||||||
21 October 2020: George
|
21 October 2020: George
|
||||||
- Fix #327: net/if.h check fails on some darwin versions; contribution by
|
- Fix #327: net/if.h check fails on some darwin versions; contribution by
|
||||||
Joshua Root.
|
Joshua Root.
|
||||||
|
@ -1413,6 +1413,19 @@ struct delegpt* find_delegation(struct module_qstate* qstate, char *nm, size_t n
|
|||||||
/******************************
|
/******************************
|
||||||
* Various debugging functions *
|
* Various debugging functions *
|
||||||
******************************/
|
******************************/
|
||||||
|
|
||||||
|
/* rename the variadic functions because python does the formatting already*/
|
||||||
|
%rename (unbound_log_info) log_info;
|
||||||
|
%rename (unbound_log_err) log_err;
|
||||||
|
%rename (unbound_log_warn) log_warn;
|
||||||
|
%rename (unbound_verbose) verbose;
|
||||||
|
/* provide functions that take one string as argument, so python can cook
|
||||||
|
the string */
|
||||||
|
%rename (log_info) pymod_log_info;
|
||||||
|
%rename (log_warn) pymod_log_warn;
|
||||||
|
%rename (log_err) pymod_log_err;
|
||||||
|
%rename (verbose) pymod_verbose;
|
||||||
|
|
||||||
void verbose(enum verbosity_value level, const char* format, ...);
|
void verbose(enum verbosity_value level, const char* format, ...);
|
||||||
void log_info(const char* format, ...);
|
void log_info(const char* format, ...);
|
||||||
void log_err(const char* format, ...);
|
void log_err(const char* format, ...);
|
||||||
@ -1422,6 +1435,19 @@ void log_dns_msg(const char* str, struct query_info* qinfo, struct reply_info* r
|
|||||||
void log_query_info(enum verbosity_value v, const char* str, struct query_info* qinf);
|
void log_query_info(enum verbosity_value v, const char* str, struct query_info* qinf);
|
||||||
void regional_log_stats(struct regional *r);
|
void regional_log_stats(struct regional *r);
|
||||||
|
|
||||||
|
/* the one argument string log functions */
|
||||||
|
void pymod_log_info(const char* str);
|
||||||
|
void pymod_log_err(const char* str);
|
||||||
|
void pymod_log_warn(const char* str);
|
||||||
|
void pymod_verbose(enum verbosity_value level, const char* str);
|
||||||
|
%{
|
||||||
|
void pymod_log_info(const char* str) { log_info("%s", str); }
|
||||||
|
void pymod_log_err(const char* str) { log_err("%s", str); }
|
||||||
|
void pymod_log_warn(const char* str) { log_warn("%s", str); }
|
||||||
|
void pymod_verbose(enum verbosity_value level, const char* str) {
|
||||||
|
verbose(level, "%s", str); }
|
||||||
|
%}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Free allocated memory from marked sources returning corresponding types *
|
* Free allocated memory from marked sources returning corresponding types *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user