1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 15:53:55 +00:00

Major agent update.

This commit is contained in:
Ylian Saint-Hilaire
2018-09-05 11:01:17 -07:00
parent 4b5c77b4fd
commit 3c80473a94
174 changed files with 19033 additions and 3307 deletions

View File

@@ -27,7 +27,7 @@ limitations under the License.
#include "ILibCrypto.h"
#include <stdarg.h>
char ILibScratchPad_RemoteLogging[255];
char ILibScratchPad_RemoteLogging[520];
//! Converts a sockaddr to a friendly string, using static memory, for logging purposes
/*!
\param addr sockaddr to convert
@@ -157,6 +157,8 @@ ILibRemoteLogging ILibRemoteLogging_Create(ILibRemoteLogging_OnWrite onOutput)
void ILibRemoteLogging_RegisterCommandSink(ILibRemoteLogging logger, ILibRemoteLogging_Modules module, ILibRemoteLogging_OnCommand sink)
{
ILibRemoteLogging_Module *obj = (ILibRemoteLogging_Module*)logger;
if (module < 0) { return; }
sem_wait(&(obj->LogSyncLock));
obj->CommandSink[ILibWhichPowerOfTwo((int)module)] = sink;
sem_post(&(obj->LogSyncLock));
@@ -669,7 +671,7 @@ ILibTransport* ILibRemoteLogging_CreateFileTransport(ILibRemoteLogging loggingMo
retVal->localFilePath = ILibString_Copy(path, pathLen);
retVal->logFile = ILibLinkedList_FileBacked_Create(retVal->localFilePath, 2048000, 4096);
if (retVal->logFile->flags != 0)
if (retVal->logFile != NULL && retVal->logFile->flags != 0)
{
modules = (unsigned short)(retVal->logFile->flags & 0xFFFF);
flags = (unsigned short)(retVal->logFile->flags >> 16);