]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: sample: Rename SenderComID/TargetComID to SenderCompID/TargetCompID
authorDaniel Corbett <dcorbett@haproxy.com>
Wed, 10 Mar 2021 04:00:34 +0000 (23:00 -0500)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 10 Mar 2021 09:44:20 +0000 (10:44 +0100)
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

doc/configuration.txt
include/haproxy/fix-t.h
include/haproxy/fix.h
reg-tests/converter/fix.vtc

index 1f5d605bcde6f9364a84a00ee29d21aad76cb64a..f0801aaba75df5928b69b11163e040d0fe523444 100644 (file)
@@ -15650,7 +15650,7 @@ fix_tag_value(<tag>)
   from the tag <tag>. <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
index bba9bd61a5ea2b4ccad5ac47ac189eef5791420b..4b4de5583c13013340828a0f68bd0aed379ed4e1 100644 (file)
@@ -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 */
index 4b5928204e988468e7c1fc2b94d451a3794b04ed..94aa8154727bd10209dc0ed5490a2d55c08ba878 100644 (file)
@@ -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;
 }
index 8bddc4d8ff038a68326198b07a572cc265519546..f035445ac1bb08aac071858399dad3ba477c4544 100644 (file)
@@ -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" }