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 1f5d605..f0801aa 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -15650,7 +15650,7 @@
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
diff --git a/include/haproxy/fix-t.h b/include/haproxy/fix-t.h
index bba9bd6..4b4de55 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 4b59282..94aa815 100644
--- a/include/haproxy/fix.h
+++ b/include/haproxy/fix.h
@@ -77,12 +77,12 @@
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 8bddc4d..f035445 100644
--- a/reg-tests/converter/fix.vtc
+++ b/reg-tests/converter/fix.vtc
@@ -73,8 +73,8 @@
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" }