1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

1. Added placeholder for new installer

2. Updated service, so placeholder will be unified across platforms
This commit is contained in:
Bryan Roe
2020-02-13 17:11:14 -08:00
parent 675dae55a9
commit b901d11f97
2 changed files with 23 additions and 1 deletions

View File

@@ -3855,6 +3855,7 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char **
} }
int ixr = 0; int ixr = 0;
int installFlag = 0;
for (ri = 0; ri < paramLen; ++ri) for (ri = 0; ri < paramLen; ++ri)
{ {
int len = (int)strnlen_s(param[ri], 4096); int len = (int)strnlen_s(param[ri], 4096);
@@ -3864,9 +3865,21 @@ int MeshAgent_AgentMode(MeshAgentHostContainer *agentHost, int paramLen, char **
ILibSimpleDataStore_Cached(agentHost->masterDb, param[ri] + 2, ix - 2, param[ri] + ix + 1, len - (ix + 1)); ILibSimpleDataStore_Cached(agentHost->masterDb, param[ri] + 2, ix - 2, param[ri] + ix + 1, len - (ix + 1));
++ixr; ++ixr;
} }
if (strcmp("-finstall", param[ri]) == 0)
{
installFlag = 1;
}
} }
paramLen -= ixr; paramLen -= ixr;
switch (installFlag)
{
case 1:
break;
default:
break;
}
agentHost->httpClientManager = ILibCreateWebClient(3, agentHost->chain); agentHost->httpClientManager = ILibCreateWebClient(3, agentHost->chain);

View File

@@ -945,7 +945,7 @@ int wmain(int argc, char* wargv[])
int retCode = 0; int retCode = 0;
int argvi, argvsz; int argvi, argvsz;
char **argv = (char**)ILibMemory_SmartAllocate(argc * sizeof(void*)); char **argv = (char**)ILibMemory_SmartAllocate((argc+1) * sizeof(void*));
for (argvi = 0; argvi < argc; ++argvi) for (argvi = 0; argvi < argc; ++argvi)
{ {
argvsz = WideCharToMultiByte(CP_UTF8, 0, (LPCWCH)wargv[argvi], -1, NULL, 0, NULL, NULL); argvsz = WideCharToMultiByte(CP_UTF8, 0, (LPCWCH)wargv[argvi], -1, NULL, 0, NULL, NULL);
@@ -953,6 +953,15 @@ int wmain(int argc, char* wargv[])
WideCharToMultiByte(CP_UTF8, 0, (LPCWCH)wargv[argvi], -1, argv[argvi], argvsz, NULL, NULL); WideCharToMultiByte(CP_UTF8, 0, (LPCWCH)wargv[argvi], -1, argv[argvi], argvsz, NULL, NULL);
} }
if (argc > 1 && (strcasecmp(argv[1], "-finstall") == 0))
{
argv[argc] = argv[1];
argv[1] = (char*)ILibMemory_SmartAllocate(4);
sprintf_s(argv[1], ILibMemory_Size(argv[1]), "run");
argc += 1;
}
/* /*
#ifndef NOMESHCMD #ifndef NOMESHCMD
// Check if this is a Mesh command operation // Check if this is a Mesh command operation