go-bridge: Add context support for wgSetLogger
Cherry picked cda99bf45c3cb95ca56204549689a0ae91ff4813 from jd/loggerCtx with the fix for wgSetLogger signature in the C header file. Signed-off-by: Andrej Mihajlov <and@mullvad.net>
This commit is contained in:
committed by
Andrej Mihajlov
parent
ddf8ade9c6
commit
8c057bf928
@@ -10,9 +10,9 @@
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef void(*logger_fn_t)(int level, const char *msg);
|
||||
typedef void(*logger_fn_t)(void *context, int level, const char *msg);
|
||||
extern void wgEnableRoaming(bool enabled);
|
||||
extern void wgSetLogger(logger_fn_t logger_fn);
|
||||
extern void wgSetLogger(void *context, logger_fn_t logger_fn);
|
||||
extern int wgTurnOn(const char *settings, int32_t tun_fd);
|
||||
extern void wgTurnOff(int handle);
|
||||
extern int64_t wgSetConfig(int handle, const char *settings);
|
||||
|
||||
Reference in New Issue
Block a user