|
@@ -9015,6 +9015,7 @@ end:
|
|
|
int handleChangeConfigurationRequest(char *uuid, char *payload)
|
|
|
{
|
|
|
mtrace();
|
|
|
+ int valueInvalid = NO;
|
|
|
int result = FAIL;
|
|
|
char keystr[40]={0};
|
|
|
char valuestr[501]={0}; //value should be limited in 500 bytes
|
|
@@ -9035,13 +9036,14 @@ int handleChangeConfigurationRequest(char *uuid, char *payload)
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ valueInvalid = YES;
|
|
|
DEBUG_ERROR("The ChangeConfiguration value is NULL or OVER SIZE.\n");
|
|
|
}
|
|
|
}
|
|
|
json_object_put(ChangeConfiguration);
|
|
|
|
|
|
|
|
|
- if((uuid==NULL) || (payload ==NULL) || (strlen(valuestr)<=0))
|
|
|
+ if((uuid==NULL) || (payload ==NULL) || (valueInvalid == YES))
|
|
|
{
|
|
|
DEBUG_ERROR("Payload is null or not accepted.\n");
|
|
|
sprintf(comfirmstr, "%s", ConfigurationStatusStr[ConfigurationStatus_Rejected] );
|
|
@@ -12884,7 +12886,7 @@ int handleSetChargingProfileRequest(char *uuid, char *payload)
|
|
|
for(uint8_t idxPeriod=0;idxPeriod<chargingSchedulePeriodCount;idxPeriod++)
|
|
|
{
|
|
|
|
|
|
- if((SetProfileReq.ChargingProfile.ChargingSchedule.ChargingSchedulePeriod[idxPeriod].Limit > (SetProfileReq.ChargingProfile.ChargingSchedule.ChargingRateUnit[0]=='W'?modelnameInfo.ratedPower:modelnameInfo.ParsingInfo[0].Current)))
|
|
|
+ if((SetProfileReq.ChargingProfile.ChargingSchedule.ChargingSchedulePeriod[idxPeriod].Limit*(SetProfileReq.ChargingProfile.ChargingSchedule.ChargingRateUnit[0]=='W'?1:220*(SetProfileReq.ChargingProfile.ChargingSchedule.ChargingSchedulePeriod[idxPeriod].NumberPhases==0?3:SetProfileReq.ChargingProfile.ChargingSchedule.ChargingSchedulePeriod[idxPeriod].NumberPhases)) > modelnameInfo.ratedPower))
|
|
|
{
|
|
|
sprintf(comfirmstr, "%s", ChargingProfileStatusStr[ChargingProfileStatus_Rejected] );
|
|
|
DEBUG_WARN("Profile period-%02d is invalid limit: %.2f %s with phase %d.\n", idxPeriod,
|
|
@@ -14372,7 +14374,7 @@ void handleBootNotificationResponse(char *payload, int gun_index)
|
|
|
{
|
|
|
server_pending = TRUE;
|
|
|
}
|
|
|
- syncDateTimeRTC(ShmOCPP16DataPH->BootNotification.ResponseCurrentTime);
|
|
|
+ //syncDateTimeRTC(ShmOCPP16DataPH->BootNotification.ResponseCurrentTime);
|
|
|
|
|
|
srand(time(NULL));
|
|
|
refreshStartTimer(&clientTime.Heartbeat);
|
|
@@ -14444,7 +14446,7 @@ void handleHeartbeatResponse(char *payload, int gun_index)
|
|
|
HeartBeatWithNOResponse = 0;
|
|
|
refreshStartTimer(&clientTime.Heartbeat);
|
|
|
|
|
|
- syncDateTimeRTC(ShmOCPP16DataPH->Heartbeat.ResponseCurrentTime);
|
|
|
+ //syncDateTimeRTC(ShmOCPP16DataPH->Heartbeat.ResponseCurrentTime);
|
|
|
}
|
|
|
|
|
|
void handleMeterValuesResponse(char *payload, int gun_index)
|