Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fix for PSN mismstch compilation error #80

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions xp/annotations/gg_annotations.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
mikehuovila marked this conversation as resolved.
Show resolved Hide resolved
.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) \
Expand Down
2 changes: 1 addition & 1 deletion xp/gattlink/gg_gattlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading