From a75a3d71af6cda5e9bdd6074995165ebc12ffd0d Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Thu, 8 Feb 2024 14:37:08 -0500 Subject: [PATCH 1/2] Add fix for PSN mismstch compilation error --- xp/annotations/gg_annotations.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/xp/annotations/gg_annotations.h b/xp/annotations/gg_annotations.h index b743361a..e970be9b 100644 --- a/xp/annotations/gg_annotations.h +++ b/xp/annotations/gg_annotations.h @@ -81,15 +81,16 @@ typedef struct { .error_details = GG_ANNOT_ERR(err), \ .has_error_code = false}) -#define GG_LOG_COMMS_ERROR_PSN(err, exp_psn, rec_psn) \ - GG_LOG_O_SEVERE(comms_error, {.has_error_details = true, \ - .error_details = GG_ANNOT_ERR(err), \ - .has_unexpected_psn = true, \ - .unexpected_psn = { \ - .has_expected_psn = true, \ - .expected_psn = exp_psn, \ - .has_received_psn = true, \ - .received_psn = rec_psn}, \ +#define GG_LOG_COMMS_ERROR_PSN(err, exp_psn, rec_psn) \ + GG_LOG_O_SEVERE(comms_error, {.has_error_details = true, \ + .error_details = GG_ANNOT_ERR(err), \ + .which_error_info = \ + site_log_GoldenGate_CommsError_unexpected_psn_tag,\ + .error_info.unexpected_psn = { \ + .has_expected_psn = true, \ + .expected_psn = exp_psn, \ + .has_received_psn = true, \ + .received_psn = rec_psn}, \ .has_error_code = false}) #define GG_LOG_COMMS_ERROR_CODE(err, code) \ From fff4f6d639d5faec39d4d528de47b1d8931cf8b7 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Fri, 9 Feb 2024 11:53:53 -0500 Subject: [PATCH 2/2] Fix annotating wrong PSN in prev received PSN annotation --- xp/gattlink/gg_gattlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xp/gattlink/gg_gattlink.c b/xp/gattlink/gg_gattlink.c index 3e8572da..178b38e9 100644 --- a/xp/gattlink/gg_gattlink.c +++ b/xp/gattlink/gg_gattlink.c @@ -921,7 +921,7 @@ GG_GattlinkProtocol_HandleDataPacket(GG_GattlinkProtocol* self, GG_LOG_WARNING("Received previously received PSN (%d) != Expected (%d), Re-acking with last received PSN (%d)", (int)psn, (int)self->in.next_expected_data_psn, self->out.psn_to_ack_with); GG_LOG_COMMS_ERROR_PSN(GG_LIB_GATTLINK_UNEXPECTED_PSN, - (int)self->out.psn_to_ack_with, (int)psn); + (int)self->out.next_expected_ack_sn, (int)psn); } // Increment the number of unacked packets