- R-SESSION: send correct payload type tag depending on payload

v1.6_develop_rgoose_sntp
Michael Zillgith 2 years ago
parent da62fe854f
commit 9b12a7e5bd

@ -862,7 +862,7 @@ encodePacket(RSession self, uint8_t payloadType, uint8_t* buffer, int bufPos, RS
while (element) {
/* payload type ? (according to example in annex G) */
buffer[bufPos++] = 0x82;
buffer[bufPos++] = element->payloadType;
/* simulation */
buffer[bufPos++] = element->simulation;
@ -964,6 +964,7 @@ RSession_sendMessage(RSession self, RSessionProtocol_SPDU_ID spduId, bool simula
element.simulation = simulation;
element.appId = appId;
element.payload = payload;
element.payloadType = (spduId & 0x0f) + 0x80;
element.payloadSize = payloadSize;
element.nextElement = NULL;

@ -69,6 +69,7 @@ struct sRSessionPayloadElement
{
bool simulation;
uint16_t appId;
uint8_t payloadType;
uint8_t* payload;
int payloadSize;
RSessionPayloadElement nextElement; /* NULL when no more elements follow */

Loading…
Cancel
Save