api: remove return value from logger function
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
87ef399d1c
commit
e73613ee24
@ -119,7 +119,7 @@ Non-zero to continue iterating adapters; zero to stop.
|
|||||||
|
|
||||||
#### WINTUN\_LOGGER\_CALLBACK
|
#### WINTUN\_LOGGER\_CALLBACK
|
||||||
|
|
||||||
`typedef BOOL(* WINTUN_LOGGER_CALLBACK) (WINTUN_LOGGER_LEVEL Level, const WCHAR *Message)`
|
`typedef void(* WINTUN_LOGGER_CALLBACK) (WINTUN_LOGGER_LEVEL Level, const WCHAR *Message)`
|
||||||
|
|
||||||
Called by internal logger to report diagnostic messages
|
Called by internal logger to report diagnostic messages
|
||||||
|
|
||||||
@ -128,10 +128,6 @@ Called by internal logger to report diagnostic messages
|
|||||||
- *Level*: Message level.
|
- *Level*: Message level.
|
||||||
- *Message*: Message text.
|
- *Message*: Message text.
|
||||||
|
|
||||||
**Returns**
|
|
||||||
|
|
||||||
Anything - return value is ignored.
|
|
||||||
|
|
||||||
#### WINTUN\_SESSION\_HANDLE
|
#### WINTUN\_SESSION\_HANDLE
|
||||||
|
|
||||||
`typedef void* WINTUN_SESSION_HANDLE`
|
`typedef void* WINTUN_SESSION_HANDLE`
|
||||||
|
@ -39,7 +39,7 @@ WriteFormatted(_In_ DWORD StdHandle, _In_z_ const WCHAR *Template, ...)
|
|||||||
return SizeWritten / sizeof(WCHAR);
|
return SizeWritten / sizeof(WCHAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CALLBACK
|
static void CALLBACK
|
||||||
ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine)
|
ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine)
|
||||||
{
|
{
|
||||||
const WCHAR *Template;
|
const WCHAR *Template;
|
||||||
@ -55,10 +55,9 @@ ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine)
|
|||||||
Template = L"[!] %1\n";
|
Template = L"[!] %1\n";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
WriteFormatted(STD_ERROR_HANDLE, Template, LogLine);
|
WriteFormatted(STD_ERROR_HANDLE, Template, LogLine);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Argc;
|
static int Argc;
|
||||||
|
@ -192,10 +192,8 @@ typedef enum
|
|||||||
* @param Level Message level.
|
* @param Level Message level.
|
||||||
*
|
*
|
||||||
* @param Message Message text.
|
* @param Message Message text.
|
||||||
*
|
|
||||||
* @return Anything - return value is ignored.
|
|
||||||
*/
|
*/
|
||||||
typedef BOOL(CALLBACK *WINTUN_LOGGER_CALLBACK)(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Message);
|
typedef void(CALLBACK *WINTUN_LOGGER_CALLBACK)(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *Message);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets logger callback function.
|
* Sets logger callback function.
|
||||||
|
@ -61,7 +61,7 @@ InitializeWintun(void)
|
|||||||
return Wintun;
|
return Wintun;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CALLBACK
|
static void CALLBACK
|
||||||
ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine)
|
ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine)
|
||||||
{
|
{
|
||||||
FILETIME Timestamp;
|
FILETIME Timestamp;
|
||||||
@ -81,7 +81,7 @@ ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine)
|
|||||||
LevelMarker = L'!';
|
LevelMarker = L'!';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return;
|
||||||
}
|
}
|
||||||
fwprintf(
|
fwprintf(
|
||||||
stderr,
|
stderr,
|
||||||
@ -95,7 +95,6 @@ ConsoleLogger(_In_ WINTUN_LOGGER_LEVEL Level, _In_z_ const WCHAR *LogLine)
|
|||||||
SystemTime.wMilliseconds,
|
SystemTime.wMilliseconds,
|
||||||
LevelMarker,
|
LevelMarker,
|
||||||
LogLine);
|
LogLine);
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD
|
static DWORD
|
||||||
|
Loading…
Reference in New Issue
Block a user