From: Daniel Corbett Date: Wed, 10 Mar 2021 04:00:34 +0000 (-0500) Subject: BUG/MINOR: sample: Rename SenderComID/TargetComID to SenderCompID/TargetCompID X-Git-Tag: v2.4-dev12~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=befef70e23fadc956cb32f6912e9e795db70ca21;p=thirdparty%2Fhaproxy.git BUG/MINOR: sample: Rename SenderComID/TargetComID to SenderCompID/TargetCompID The recently introduced Financial Information eXchange (FIX) converters have some hard coded tags based on the specification that were misspelled. Specifically, SenderComID and TargetComID should be SenderCompID and TargetCompID according to the specification [1][2]. This patch updates all references, which includes the converters themselves, the regression test, and the documentation. [1] https://fiximate.fixtrading.org/en/FIX.5.0SP2_EP264/tag49.html [2] https://fiximate.fixtrading.org/en/FIX.5.0SP2_EP264/tag56.html --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 1f5d605bcd..f0801aaba7 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -15650,7 +15650,7 @@ fix_tag_value() from the tag . can be a string or an integer pointing to the desired tag. Any integer value is accepted, but only the following strings are translated into their integer equivalent: BeginString, BodyLength, - MsgType, SenderComID, TargetComID, CheckSum. More tag names can be easily + MsgType, SenderCompID, TargetCompID, CheckSum. More tag names can be easily added. Due to current HAProxy design, only the first message sent by the client and diff --git a/include/haproxy/fix-t.h b/include/haproxy/fix-t.h index bba9bd61a5..4b4de5583c 100644 --- a/include/haproxy/fix-t.h +++ b/include/haproxy/fix-t.h @@ -47,8 +47,8 @@ #define FIX_TAG_BodyLength 9 #define FIX_TAG_CheckSum 10 #define FIX_TAG_MsgType 35 -#define FIX_TAG_SenderComID 49 -#define FIX_TAG_TargetComID 56 +#define FIX_TAG_SenderCompID 49 +#define FIX_TAG_TargetCompID 56 #define FIX_MSG_MINSIZE 26 /* Minimal length for a FIX Message */ diff --git a/include/haproxy/fix.h b/include/haproxy/fix.h index 4b5928204e..94aa815472 100644 --- a/include/haproxy/fix.h +++ b/include/haproxy/fix.h @@ -77,12 +77,12 @@ static inline unsigned int fix_tagid(const struct ist tag) return FIX_TAG_CheckSum; else if (isteqi(tag, ist("BodyLength"))) return FIX_TAG_BodyLength; - else if (isteqi(tag, ist("TargetComID"))) - return FIX_TAG_TargetComID; + else if (isteqi(tag, ist("TargetCompID"))) + return FIX_TAG_TargetCompID; else if (isteqi(tag, ist("BeginString"))) return FIX_TAG_BeginString; - else if (isteqi(tag, ist("SenderComID"))) - return FIX_TAG_SenderComID; + else if (isteqi(tag, ist("SenderCompID"))) + return FIX_TAG_SenderCompID; return 0; } diff --git a/reg-tests/converter/fix.vtc b/reg-tests/converter/fix.vtc index 8bddc4d8ff..f035445ac1 100644 --- a/reg-tests/converter/fix.vtc +++ b/reg-tests/converter/fix.vtc @@ -73,8 +73,8 @@ haproxy h1 -conf { tcp-request content set-var(req.fix_vsn) req.payload(0,0),fix_tag_value(BeginString) tcp-request content set-var(req.fix_len) req.payload(0,0),fix_tag_value(BodyLength) tcp-request content set-var(req.fix_type) req.payload(0,0),fix_tag_value(MsgType) - tcp-request content set-var(req.fix_sender) req.payload(0,0),fix_tag_value(SenderComID) - tcp-request content set-var(req.fix_target) req.payload(0,0),fix_tag_value(TargetComID) + tcp-request content set-var(req.fix_sender) req.payload(0,0),fix_tag_value(SenderCompID) + tcp-request content set-var(req.fix_target) req.payload(0,0),fix_tag_value(TargetCompID) tcp-request content set-var(req.fix_chksum) req.payload(0,0),fix_tag_value(CheckSum) tcp-request content reject if ! { var(req.fix_vsn) "FIX.4.4" } || ! { var(req.fix_len) "102" } tcp-request content reject if ! { var(req.fix_type) "A" } || ! { var(req.fix_sender) "CLIENT1" }