|
|
|
@ -30,17 +30,17 @@ print_help()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
mmsFileDirectoryHandler (void* parameter, char* filename, uint32_t size, uint64_t lastModified)
|
|
|
|
|
mmsFileDirectoryHandler(void* parameter, char* filename, uint32_t size, uint64_t lastModified)
|
|
|
|
|
{
|
|
|
|
|
char* lastName = (char*) parameter;
|
|
|
|
|
|
|
|
|
|
strcpy (lastName, filename);
|
|
|
|
|
strcpy(lastName, filename);
|
|
|
|
|
|
|
|
|
|
printf("%s\n", filename);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
mmsGetFileAttributeHandler (void* parameter, char* filename, uint32_t size, uint64_t lastModified)
|
|
|
|
|
mmsGetFileAttributeHandler(void* parameter, char* filename, uint32_t size, uint64_t lastModified)
|
|
|
|
|
{
|
|
|
|
|
char gtString[30];
|
|
|
|
|
Conversions_msTimeToGeneralizedTime(lastModified, (uint8_t*) gtString);
|
|
|
|
@ -99,7 +99,8 @@ printRawMmsMessage(void* parameter, uint8_t* message, int messageLength, bool re
|
|
|
|
|
printf("\n");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
|
int main(int argc, char** argv)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
char* hostname = StringUtils_copyString("localhost");
|
|
|
|
|
int tcpPort = 102;
|
|
|
|
@ -133,6 +134,7 @@ int main(int argc, char** argv) {
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case 'h':
|
|
|
|
|
free(hostname);
|
|
|
|
|
hostname = StringUtils_copyString(optarg);
|
|
|
|
|
break;
|
|
|
|
|
case 'p':
|
|
|
|
@ -334,7 +336,8 @@ int main(int argc, char** argv) {
|
|
|
|
|
|
|
|
|
|
readNext = true;
|
|
|
|
|
}
|
|
|
|
|
} while ((moreFollows == true) || (readNext == true));
|
|
|
|
|
}
|
|
|
|
|
while ((moreFollows == true) || (readNext == true));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -363,14 +366,12 @@ int main(int argc, char** argv) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (error != MMS_ERROR_NONE) {
|
|
|
|
|
printf("Reading variable failed: (ERROR %i)\n", error);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
printf("Read SUCCESS\n");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result != NULL) {
|
|
|
|
|
char outbuf[1024];
|
|
|
|
|
|
|
|
|
@ -430,7 +431,7 @@ int main(int argc, char** argv) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
exit:
|
|
|
|
|
exit:
|
|
|
|
|
free(hostname);
|
|
|
|
|
free(domainName);
|
|
|
|
|
free(variableName);
|
|
|
|
|