aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mbtcp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-06-14 17:49:53 +0000
committerMichael Mann <mmann78@netscape.net>2013-06-14 17:49:53 +0000
commitde68fd6eea9996ca8572220f379e376acd0181e2 (patch)
treec874b6fd18d5b571366c0e3017b58e1fb73f3266 /epan/dissectors/packet-mbtcp.c
parent14b65f91a44b89ef460df391717b2a6ac317980d (diff)
Removed check_col() and the occasional tree.
svn path=/trunk/; revision=49938
Diffstat (limited to 'epan/dissectors/packet-mbtcp.c')
-rw-r--r--epan/dissectors/packet-mbtcp.c166
1 files changed, 80 insertions, 86 deletions
diff --git a/epan/dissectors/packet-mbtcp.c b/epan/dissectors/packet-mbtcp.c
index d5b04cacd5..8948e678c5 100644
--- a/epan/dissectors/packet-mbtcp.c
+++ b/epan/dissectors/packet-mbtcp.c
@@ -393,52 +393,49 @@ dissect_mbtcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* "Request" or "Response" */
packet_type = classify_mbtcp_packet(pinfo);
- if (check_col(pinfo->cinfo, COL_INFO))
- {
- switch ( packet_type ) {
- case QUERY_PACKET :
- pkt_type_str="Query";
- break;
- case RESPONSE_PACKET :
- pkt_type_str="Response";
- break;
- case CANNOT_CLASSIFY :
- err_str="Unable to classify as query or response.";
- pkt_type_str="unknown";
- break;
- default :
- break;
+ switch ( packet_type ) {
+ case QUERY_PACKET :
+ pkt_type_str="Query";
+ break;
+ case RESPONSE_PACKET :
+ pkt_type_str="Response";
+ break;
+ case CANNOT_CLASSIFY :
+ err_str="Unable to classify as query or response.";
+ pkt_type_str="unknown";
+ break;
+ default :
+ break;
+ }
+ if ( exception_code != 0 )
+ err_str="Exception returned ";
+
+ if (subfunction_code == 0) {
+ if (strlen(err_str) > 0) {
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Trans: %5u; Unit: %3u, Func: %3u: %s. %s",
+ pkt_type_str, transaction_id, unit_id,
+ function_code, func_string, err_str);
}
- if ( exception_code != 0 )
- err_str="Exception returned ";
-
- if (subfunction_code == 0) {
- if (strlen(err_str) > 0) {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Trans: %5u; Unit: %3u, Func: %3u: %s. %s",
- pkt_type_str, transaction_id, unit_id,
- function_code, func_string, err_str);
- }
- else {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Trans: %5u; Unit: %3u, Func: %3u: %s",
- pkt_type_str, transaction_id, unit_id,
- function_code, func_string);
- }
+ else {
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Trans: %5u; Unit: %3u, Func: %3u: %s",
+ pkt_type_str, transaction_id, unit_id,
+ function_code, func_string);
+ }
+ }
+ else {
+ if (strlen(err_str) > 0) {
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Trans: %5u; Unit: %3u, Func: %3u/%3u: %s. %s",
+ pkt_type_str, transaction_id, unit_id,
+ function_code, subfunction_code, func_string, err_str);
}
else {
- if (strlen(err_str) > 0) {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Trans: %5u; Unit: %3u, Func: %3u/%3u: %s. %s",
- pkt_type_str, transaction_id, unit_id,
- function_code, subfunction_code, func_string, err_str);
- }
- else {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Trans: %5u; Unit: %3u, Func: %3u/%3u: %s",
- pkt_type_str, transaction_id, unit_id,
- function_code, subfunction_code, func_string);
- }
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Trans: %5u; Unit: %3u, Func: %3u/%3u: %s",
+ pkt_type_str, transaction_id, unit_id,
+ function_code, subfunction_code, func_string);
}
}
@@ -528,52 +525,49 @@ dissect_mbrtu_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* "Request" or "Response" */
packet_type = classify_mbrtu_packet(pinfo);
- if (check_col(pinfo->cinfo, COL_INFO))
- {
- switch ( packet_type ) {
- case QUERY_PACKET :
- pkt_type_str="Query";
- break;
- case RESPONSE_PACKET :
- pkt_type_str="Response";
- break;
- case CANNOT_CLASSIFY :
- err_str="Unable to classify as query or response.";
- pkt_type_str="unknown";
- break;
- default :
- break;
+ switch ( packet_type ) {
+ case QUERY_PACKET :
+ pkt_type_str="Query";
+ break;
+ case RESPONSE_PACKET :
+ pkt_type_str="Response";
+ break;
+ case CANNOT_CLASSIFY :
+ err_str="Unable to classify as query or response.";
+ pkt_type_str="unknown";
+ break;
+ default :
+ break;
+ }
+ if ( exception_code != 0 )
+ err_str="Exception returned ";
+
+ if (subfunction_code == 0) {
+ if (strlen(err_str) > 0) {
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Unit: %3u, Func: %3u: %s. %s",
+ pkt_type_str, unit_id,
+ function_code, func_string, err_str);
}
- if ( exception_code != 0 )
- err_str="Exception returned ";
-
- if (subfunction_code == 0) {
- if (strlen(err_str) > 0) {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Unit: %3u, Func: %3u: %s. %s",
- pkt_type_str, unit_id,
- function_code, func_string, err_str);
- }
- else {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Unit: %3u, Func: %3u: %s",
- pkt_type_str, unit_id,
- function_code, func_string);
- }
+ else {
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Unit: %3u, Func: %3u: %s",
+ pkt_type_str, unit_id,
+ function_code, func_string);
+ }
+ }
+ else {
+ if (strlen(err_str) > 0) {
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Unit: %3u, Func: %3u/%3u: %s. %s",
+ pkt_type_str, unit_id,
+ function_code, subfunction_code, func_string, err_str);
}
else {
- if (strlen(err_str) > 0) {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Unit: %3u, Func: %3u/%3u: %s. %s",
- pkt_type_str, unit_id,
- function_code, subfunction_code, func_string, err_str);
- }
- else {
- col_add_fstr(pinfo->cinfo, COL_INFO,
- "%8s: Unit: %3u, Func: %3u/%3u: %s",
- pkt_type_str, unit_id,
- function_code, subfunction_code, func_string);
- }
+ col_add_fstr(pinfo->cinfo, COL_INFO,
+ "%8s: Unit: %3u, Func: %3u/%3u: %s",
+ pkt_type_str, unit_id,
+ function_code, subfunction_code, func_string);
}
}