Skip to content

Commit

Permalink
Merge "Option to keep FIX sequence numbers" from Denis
Browse files Browse the repository at this point in the history
  • Loading branch information
penberg committed Oct 21, 2015
2 parents 8b7e225 + a63e680 commit edd92d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions include/libtrading/proto/fix_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ enum fix_send_flag {

enum fix_recv_flag {
FIX_RECV_FLAG_MSG_DONTWAIT = 1UL << 16, // upper 16 bits
FIX_RECV_KEEP_IN_MSGSEQNUM = 1UL << 17
};

#ifdef __cplusplus
Expand Down
4 changes: 2 additions & 2 deletions lib/proto/fix_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ int fix_session_recv(struct fix_session *self, struct fix_message **res, unsigne

if (!fix_message_parse(msg, self->dialect, buffer, flags)) {
self->rx_timestamp = self->now;
self->in_msg_seq_num++;
if (!(flags & FIX_RECV_KEEP_IN_MSGSEQNUM)) self->in_msg_seq_num++;
goto parsed;
}

Expand All @@ -230,7 +230,7 @@ int fix_session_recv(struct fix_session *self, struct fix_message **res, unsigne

if (!fix_message_parse(msg, self->dialect, buffer, flags)) {
self->rx_timestamp = self->now;
self->in_msg_seq_num++;
if (!(flags & FIX_RECV_KEEP_IN_MSGSEQNUM)) self->in_msg_seq_num++;
goto parsed;
}

Expand Down

0 comments on commit edd92d9

Please sign in to comment.