aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sercosiii
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-04-06 16:13:09 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-04-06 16:13:09 +0000
commit846eed1d9e69bf6b256c8b2214a4391dd6446d9a (patch)
treeee49239d686d336c57a2afa926b02bc432053acb /plugins/sercosiii
parenta2241bf7b84e6a73fa271afea36f6cf8e0656695 (diff)
Get rid of check_col
svn path=/trunk/; revision=32401
Diffstat (limited to 'plugins/sercosiii')
-rw-r--r--plugins/sercosiii/packet-sercosiii_1v1.c5
-rw-r--r--plugins/sercosiii/packet-sercosiii_1v1_at.c19
-rw-r--r--plugins/sercosiii/packet-sercosiii_1v1_mdt.c19
3 files changed, 17 insertions, 26 deletions
diff --git a/plugins/sercosiii/packet-sercosiii_1v1.c b/plugins/sercosiii/packet-sercosiii_1v1.c
index c40f2f5afd..fa4288aee5 100644
--- a/plugins/sercosiii/packet-sercosiii_1v1.c
+++ b/plugins/sercosiii/packet-sercosiii_1v1.c
@@ -69,10 +69,7 @@ dissect_siii(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tel_no = type &0xF; /* even though it's reserved (the V1.1 spec states that it is reserved for additional MDT/AT) */
- if(check_col(pinfo->cinfo, COL_INFO))
- {
- col_append_fstr(pinfo->cinfo, COL_INFO, "%s%u Channel=%s", tel_type, tel_no, tel_ch);
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, "%s%u Channel=%s", tel_type, tel_no, tel_ch);
ti = proto_tree_add_item(tree, proto_siii, tvb, 0, -1, FALSE);
diff --git a/plugins/sercosiii/packet-sercosiii_1v1_at.c b/plugins/sercosiii/packet-sercosiii_1v1_at.c
index 818454ed2f..bf2050f547 100644
--- a/plugins/sercosiii/packet-sercosiii_1v1_at.c
+++ b/plugins/sercosiii/packet-sercosiii_1v1_at.c
@@ -143,18 +143,15 @@ void dissect_siii_at(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SIII AT");
- if(check_col(pinfo->cinfo, COL_INFO))
+ if(phase & 0x80) /* communication phase switching in progress */
{
- if(phase & 0x80) /* communication phase switching in progress */
- {
- col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP?s -> CP%u",
- (phase&0x0f));
- }
- else /* communication as usual */
- {
- col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP%u",
- (phase&0x0f));
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP?s -> CP%u",
+ (phase&0x0f));
+ }
+ else /* communication as usual */
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP%u",
+ (phase&0x0f));
}
ti = proto_tree_add_text(tree, tvb, 0, -1, "AT%u", telno);
diff --git a/plugins/sercosiii/packet-sercosiii_1v1_mdt.c b/plugins/sercosiii/packet-sercosiii_1v1_mdt.c
index b8999f940a..5a1ce6d5de 100644
--- a/plugins/sercosiii/packet-sercosiii_1v1_mdt.c
+++ b/plugins/sercosiii/packet-sercosiii_1v1_mdt.c
@@ -142,18 +142,15 @@ void dissect_siii_mdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
t_phase = (tvb_get_guint8(tvb, 1)&0x8F); /* read communication phase out of SERCOS III header */
telno = (tvb_get_guint8(tvb, 0) & 0xF); /* read number of MDT out of SERCOS III header */
- if(check_col(pinfo->cinfo, COL_INFO))
+ if(t_phase & 0x80) /* communication phase switching in progress */
{
- if(t_phase & 0x80) /* communication phase switching in progress */
- {
- col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP?s -> CP%u",
- (t_phase&0x0f));
- }
- else /* communication as usual */
- {
- col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP%u",
- (t_phase&0x0f));
- }
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP?s -> CP%u",
+ (t_phase&0x0f));
+ }
+ else /* communication as usual */
+ {
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Phase=CP%u",
+ (t_phase&0x0f));
}
ti = proto_tree_add_text(tree, tvb, 0, -1, "MDT%u", telno);