Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnobori <da.git@softether.co.jp>2023-06-30 06:19:06 +0300
committerdnobori <da.git@softether.co.jp>2023-06-30 06:19:06 +0300
commit89939eb52f1f40e4f75c76e8d5eca019de103532 (patch)
treee51d227e06363817463efa2650e97d07290aed34 /src/Mayaqua/Kernel.c
parent7d831acbfb967bdbbb17c9e579abdda380644148 (diff)
v4.42-9798-rtmv4.42-9798-rtm
Diffstat (limited to 'src/Mayaqua/Kernel.c')
-rw-r--r--src/Mayaqua/Kernel.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/Mayaqua/Kernel.c b/src/Mayaqua/Kernel.c
index 2edc142e..47bce23d 100644
--- a/src/Mayaqua/Kernel.c
+++ b/src/Mayaqua/Kernel.c
@@ -2401,10 +2401,34 @@ void AbortExitEx(char *msg)
msg = "Unknown Error";
}
- f = fopen("abort_error_log.txt", "w");
+ f = fopen("abort_error_log.txt", "a");
if (f != NULL)
{
+ SYSTEMTIME time = CLEAN;
+ char time_str[128] = CLEAN;
+ char* crlf = "\r\n";
+ char* tag = "---------";
+
+ LocalTime(&time);
+
+ sprintf(time_str, "%04u-%02u-%02u %02u:%02u:%02u",
+ time.wYear, time.wMonth, time.wDay,
+ time.wHour, time.wMinute, time.wSecond);
+
+ fwrite(tag, 1, strlen(tag), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
+ fwrite(time_str, 1, strlen(time_str), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
fwrite(msg, 1, strlen(msg), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
fclose(f);
}