1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-24 04:04:31 +00:00

Added workaround for macOS LaunchD placing all parameters within quotes

This commit is contained in:
Bryan Roe
2020-02-26 13:59:21 -08:00
parent 908698fb68
commit cd111f0f6e
2 changed files with 24 additions and 0 deletions

View File

@@ -114,6 +114,15 @@ void ILibSimpleDataStore_SHA384(char *data, int datalen, char* result) { util_sh
void ILibSimpleDataStore_Cached(ILibSimpleDataStore dataStore, char* key, int keyLen, char* value, int valueLen)
{
if (valueLen > 2)
{
if (value[0] == '"' && value[valueLen - 1] == '"')
{
value = value + 1;
valueLen -= 2;
}
}
ILibSimpleDataStore_Root *root = (ILibSimpleDataStore_Root*)dataStore;
if (root->cacheTable == NULL) { root->cacheTable = ILibHashtable_Create(); }
ILibSimpleDataStore_CacheEntry *entry = (ILibSimpleDataStore_CacheEntry*)ILibMemory_Allocate(sizeof(ILibSimpleDataStore_CacheEntry) + valueLen, 0, NULL, NULL);