|
@@ -2,9 +2,9 @@
|
|
|
#include <sys/types.h>
|
|
|
#include <sys/ipc.h>
|
|
|
#include <sys/shm.h>
|
|
|
-#include <sys/stat.h>
|
|
|
+#include <sys/stat.h>
|
|
|
#include <sys/time.h> // gettimeofday sleep usleep
|
|
|
-#include <fcntl.h>
|
|
|
+#include <fcntl.h>
|
|
|
#include <stddef.h>
|
|
|
#include <stdio.h>
|
|
|
#include <string.h>
|
|
@@ -21,9 +21,7 @@
|
|
|
#include "hashmap.h"
|
|
|
#include "ShareMemory.h"
|
|
|
#include "TransactionQueue.h"
|
|
|
-#include "SystemLogMessage.h"
|
|
|
#include "define.h"
|
|
|
-#include "ShareMemory.h"
|
|
|
#include "SystemLogMessage.h"
|
|
|
|
|
|
#include <sys/socket.h>
|
|
@@ -38,7 +36,7 @@
|
|
|
|
|
|
#include <time.h>
|
|
|
#include "MessageHandler.h"
|
|
|
-#include <assert.h>
|
|
|
+#include <assert.h>
|
|
|
#include <pthread.h>
|
|
|
#include <mcheck.h>
|
|
|
|
|
@@ -8159,16 +8157,20 @@ int handleSendLocalListRequest(char *uuid, char *payload)
|
|
|
}
|
|
|
sstr[c] = '\0';
|
|
|
|
|
|
+
|
|
|
+
|
|
|
|
|
|
i = 0;
|
|
|
pch = strtok(sstr,delim1);
|
|
|
while (pch != NULL)
|
|
|
{
|
|
|
strcpy(CardList[i], pch);
|
|
|
+ DEBUG_INFO("CardList[i]=%s\n", CardList[i]);
|
|
|
pch = strtok (NULL, delim1);
|
|
|
i = i + 1;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
ShmOCPP16Data->SendLocalList.ListVersion = listVersionInt;
|
|
@@ -8190,32 +8192,54 @@ int handleSendLocalListRequest(char *uuid, char *payload)
|
|
|
}
|
|
|
sstr[j] = '\0';
|
|
|
strcpy(idTagstr, sstr);
|
|
|
+
|
|
|
|
|
|
|
|
|
memset(sstr ,0, sizeof(sstr) );
|
|
|
loc = strstr(CardList[c], "expiryDate");
|
|
|
j = 0;
|
|
|
- while (loc[3+strlen("expiryDate")+j] != '\"')
|
|
|
+ if(loc != NULL)
|
|
|
{
|
|
|
- sstr[j] = loc[3+strlen("expiryDate")+j];
|
|
|
-
|
|
|
- j++;
|
|
|
+ while (loc[3+strlen("expiryDate")+j] != '\"')
|
|
|
+ {
|
|
|
+ sstr[j] = loc[3+strlen("expiryDate")+j];
|
|
|
+
|
|
|
+ j++;
|
|
|
+ }
|
|
|
+ sstr[j] = '\0';
|
|
|
+ strcpy(expiryDate, sstr);
|
|
|
+
|
|
|
}
|
|
|
- sstr[j] = '\0';
|
|
|
- strcpy(expiryDate, sstr);
|
|
|
+ else
|
|
|
+ {
|
|
|
+ strcpy(expiryDate, "");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
memset(sstr ,0, sizeof(sstr) );
|
|
|
loc = strstr(CardList[c], "parentIdTag");
|
|
|
j = 0;
|
|
|
- while (loc[3+strlen("parentIdTag")+j] != '\"')
|
|
|
+ if(loc != NULL)
|
|
|
{
|
|
|
- sstr[j] = loc[3+strlen("parentIdTag")+j];
|
|
|
-
|
|
|
- j++;
|
|
|
+ while (loc[3+strlen("parentIdTag")+j] != '\"')
|
|
|
+ {
|
|
|
+ sstr[j] = loc[3+strlen("parentIdTag")+j];
|
|
|
+
|
|
|
+ j++;
|
|
|
+ }
|
|
|
+ sstr[j] = '\0';
|
|
|
+ strcpy(parentIdTag, sstr);
|
|
|
}
|
|
|
- sstr[j] = '\0';
|
|
|
- strcpy(parentIdTag, sstr);
|
|
|
+ else
|
|
|
+ {
|
|
|
+ strcpy(parentIdTag, "");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
memset(sstr ,0, sizeof(sstr) );
|
|
@@ -8230,9 +8254,12 @@ int handleSendLocalListRequest(char *uuid, char *payload)
|
|
|
sstr[j] = '\0';
|
|
|
strcpy(idTagstatus, sstr);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
OCPP_getIdTag(idTagstr);
|
|
|
|
|
|
- DEBUG_INFO("idTagAuthorization=%s\n",idTagAuthorization);
|
|
|
+
|
|
|
|
|
|
if(strcmp(updateTypestr, UpdateTypeStr[Full]) == 0)
|
|
|
{
|