changing the order of includes to avoid warning of duplicate var def
This commit is contained in:
parent
10fe3435ac
commit
ad1d00f7c9
|
|
@ -11,6 +11,8 @@
|
|||
"availabilitystatus.h": "c",
|
||||
"chargingspotlabel.h": "c",
|
||||
"reservation-id.h": "c",
|
||||
"stationdetails.h": "c"
|
||||
"stationdetails.h": "c",
|
||||
"managementrequest.h": "c",
|
||||
"facilities.h": "c"
|
||||
}
|
||||
}
|
||||
13
src/evm.c
13
src/evm.c
|
|
@ -1,4 +1,5 @@
|
|||
#include "evm.h"
|
||||
#include "facilities.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <it2s-asn/evcsnm/EvcsnPdu.h>
|
||||
|
|
@ -18,7 +19,6 @@
|
|||
#include <unistd.h>
|
||||
#include <zmq.h>
|
||||
|
||||
#include "facilities.h"
|
||||
|
||||
static UTF8String_t *create_utf8_from_string(const char *string, size_t length) {
|
||||
UTF8String_t *utf8_string = calloc(1, sizeof(UTF8String_t));
|
||||
|
|
@ -215,6 +215,7 @@ static int evrsrm_reservation_response(EV_RSR_t *evrsrm_request, uint8_t *evrsrm
|
|||
ReservationResponseMessage_t *response = &evrsr_response->messageBody.choice.reservationResponseMessage;
|
||||
// Assumes the pre reservation was successful
|
||||
response->reservationResponseCode = ReservationResponseCode_ok;
|
||||
|
||||
response->reservation_ID = calloc(1, sizeof(Reservation_ID_t));
|
||||
response->reservation_ID->buf = calloc(8, sizeof(uint8_t));
|
||||
response->reservation_ID->size = 8;
|
||||
|
|
@ -226,13 +227,14 @@ static int evrsrm_reservation_response(EV_RSR_t *evrsrm_request, uint8_t *evrsrm
|
|||
response->reservation_ID->buf[5] = '0' + (reservation_id / 100) % 10;
|
||||
response->reservation_ID->buf[6] = '0' + (reservation_id / 10) % 10;
|
||||
response->reservation_ID->buf[7] = '0' + reservation_id % 10;
|
||||
|
||||
response->reservation_Password = calloc(1, sizeof(Reservation_Password_t));
|
||||
response->reservation_Password->buf = calloc(8, sizeof(uint8_t));
|
||||
response->reservation_Password->size = 8;
|
||||
response->reservation_Password->buf[0] = ' ';
|
||||
response->reservation_Password->buf[1] = ' ';
|
||||
response->reservation_Password->buf[2] = ' ';
|
||||
response->reservation_Password->buf[3] = ' ';
|
||||
response->reservation_Password->buf[0] = 'i';
|
||||
response->reservation_Password->buf[1] = 't';
|
||||
response->reservation_Password->buf[2] = '2';
|
||||
response->reservation_Password->buf[3] = 's';
|
||||
response->reservation_Password->buf[4] = 'i';
|
||||
response->reservation_Password->buf[5] = 't';
|
||||
response->reservation_Password->buf[6] = '2';
|
||||
|
|
@ -248,6 +250,7 @@ static int evrsrm_reservation_response(EV_RSR_t *evrsrm_request, uint8_t *evrsrm
|
|||
goto cleanup;
|
||||
}
|
||||
*evrsrm_len = (enc.encoded + 7) / 8;
|
||||
reservation_id++;
|
||||
|
||||
cleanup:
|
||||
ASN_STRUCT_FREE(asn_DEF_EV_RSR, evrsr_response);
|
||||
|
|
|
|||
Loading…
Reference in New Issue