diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-01-17 12:19:02 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-01-17 12:19:02 +0000 |
commit | 4f70f4fcea7e252cccb8cfc7b152d2bf29e8ebad (patch) | |
tree | 2af5611d4171706d47b054521c7bc9f236b2a5df /asn1 | |
parent | dc6f743c85cf9325c4b80de5618657b4b79a460c (diff) |
Get rid of check_col();
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31544 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/camel/camel.cnf | 20 | ||||
-rw-r--r-- | asn1/camel/packet-camel-template.c | 8 | ||||
-rw-r--r-- | asn1/cmp/cmp.cnf | 8 | ||||
-rw-r--r-- | asn1/cmp/packet-cmp-template.c | 4 | ||||
-rw-r--r-- | asn1/dap/dap.cnf | 29 | ||||
-rw-r--r-- | asn1/disp/disp.cnf | 28 | ||||
-rw-r--r-- | asn1/disp/packet-disp-template.c | 3 | ||||
-rw-r--r-- | asn1/dop/dop.cnf | 8 | ||||
-rw-r--r-- | asn1/dop/packet-dop-template.c | 8 | ||||
-rw-r--r-- | asn1/dsp/packet-dsp-template.c | 3 | ||||
-rw-r--r-- | asn1/ftam/ftam.cnf | 16 | ||||
-rw-r--r-- | asn1/h225/h225.cnf | 12 |
12 files changed, 43 insertions, 104 deletions
diff --git a/asn1/camel/camel.cnf b/asn1/camel/camel.cnf index ba4cdf77f0..1f5dcfbbe6 100644 --- a/asn1/camel/camel.cnf +++ b/asn1/camel/camel.cnf @@ -201,19 +201,15 @@ static const camel_err_t camel_err_tab[] = { if (is_ExtensionField == FALSE){ if (camel_opcode_type == CAMEL_OPCODE_RETURN_ERROR){ errorCode = opcode; - if (check_col(actx->pinfo->cinfo, COL_INFO)){ - col_append_str(actx->pinfo->cinfo, COL_INFO, - val_to_str(errorCode, camel_err_code_string_vals, "Unknown CAMEL error (%%u)")); - col_append_str(actx->pinfo->cinfo, COL_INFO, " "); - col_set_fence(actx->pinfo->cinfo, COL_INFO); - } + col_append_str(actx->pinfo->cinfo, COL_INFO, + val_to_str(errorCode, camel_err_code_string_vals, "Unknown CAMEL error (%%u)")); + col_append_str(actx->pinfo->cinfo, COL_INFO, " "); + col_set_fence(actx->pinfo->cinfo, COL_INFO); }else{ - if (check_col(actx->pinfo->cinfo, COL_INFO)){ - col_append_str(actx->pinfo->cinfo, COL_INFO, - val_to_str(opcode, camel_opr_code_strings, "Unknown CAMEL (%%u)")); - col_append_str(actx->pinfo->cinfo, COL_INFO, " "); - col_set_fence(actx->pinfo->cinfo, COL_INFO); - } + col_append_str(actx->pinfo->cinfo, COL_INFO, + val_to_str(opcode, camel_opr_code_strings, "Unknown CAMEL (%%u)")); + col_append_str(actx->pinfo->cinfo, COL_INFO, " "); + col_set_fence(actx->pinfo->cinfo, COL_INFO); } gp_camelsrt_info->opcode=opcode; } diff --git a/asn1/camel/packet-camel-template.c b/asn1/camel/packet-camel-template.c index 9230a5a97a..043f054ec5 100644 --- a/asn1/camel/packet-camel-template.c +++ b/asn1/camel/packet-camel-template.c @@ -350,11 +350,9 @@ dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn /* Get the length and add 2 */ camel_pdu_size = tvb_get_guint8(tvb, offset+1)+2; - if (check_col(actx->pinfo->cinfo, COL_INFO)){ - /* Populate the info column with PDU type*/ - col_add_str(actx->pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camel_Component_vals, "Unknown Camel (%u)")); - col_append_str(actx->pinfo->cinfo, COL_INFO, " "); - } + /* Populate the info column with PDU type*/ + col_add_str(actx->pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camel_Component_vals, "Unknown Camel (%u)")); + col_append_str(actx->pinfo->cinfo, COL_INFO, " "); is_ExtensionField =FALSE; offset = dissect_camel_ROS(TRUE, tvb, offset, actx, tree, hf_index); diff --git a/asn1/cmp/cmp.cnf b/asn1/cmp/cmp.cnf index 60209d49da..4f6c709cd8 100644 --- a/asn1/cmp/cmp.cnf +++ b/asn1/cmp/cmp.cnf @@ -97,9 +97,7 @@ RevAnnContent/status pkistatus %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Body=%%s", val_to_str(branch_taken, cmp_PKIBody_vals, "unknown")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Body=%%s", val_to_str(branch_taken, cmp_PKIBody_vals, "unknown")); #.FN_PARS PKIStatus VAL_PTR = &value @@ -109,8 +107,6 @@ RevAnnContent/status pkistatus %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Status=%%s", val_to_str(value, cmp_PKIStatus_vals, "unknown")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " Status=%%s", val_to_str(value, cmp_PKIStatus_vals, "unknown")); #.END_OF_CNF diff --git a/asn1/cmp/packet-cmp-template.c b/asn1/cmp/packet-cmp-template.c index cbe4290987..69fcfc0d19 100644 --- a/asn1/cmp/packet-cmp-template.c +++ b/asn1/cmp/packet-cmp-template.c @@ -153,9 +153,7 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_type, tvb, offset++, 1, FALSE); } - if (check_col (pinfo->cinfo, COL_INFO)) { - col_add_str (pinfo->cinfo, COL_INFO, val_to_str (pdu_type, cmp_pdu_types, "0x%x")); - } + col_add_str (pinfo->cinfo, COL_INFO, val_to_str (pdu_type, cmp_pdu_types, "0x%x")); switch(pdu_type){ case CMP_TYPE_PKIMSG: diff --git a/asn1/dap/dap.cnf b/asn1/dap/dap.cnf index 46cb3808b9..b69c7124cb 100644 --- a/asn1/dap/dap.cnf +++ b/asn1/dap/dap.cnf @@ -267,8 +267,7 @@ OPERATION.&ResultType %(DEFAULT_BODY)s - if(check_col(actx->pinfo->cinfo, COL_INFO)) - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", x509if_get_last_dn()); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", x509if_get_last_dn()); @@ -306,9 +305,7 @@ OPERATION.&ResultType %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_SecurityProblem_vals, "SecurityProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_SecurityProblem_vals, "SecurityProblem(%%d)")); #.FN_PARS ServiceProblem VAL_PTR = &problem @@ -318,9 +315,7 @@ OPERATION.&ResultType %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_ServiceProblem_vals, "ServiceProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_ServiceProblem_vals, "ServiceProblem(%%d)")); #.FN_PARS UpdateProblem VAL_PTR = &problem @@ -330,9 +325,7 @@ OPERATION.&ResultType %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_UpdateProblem_vals, "UpdateProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_UpdateProblem_vals, "UpdateProblem(%%d)")); #.FN_PARS LimitProblem VAL_PTR = &problem @@ -342,9 +335,7 @@ OPERATION.&ResultType %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_LimitProblem_vals, "LimitProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, dap_LimitProblem_vals, "LimitProblem(%%d)")); #.END @@ -354,9 +345,7 @@ OPERATION.&ResultType %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(subset, dap_T_subset_vals, "Subset(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(subset, dap_T_subset_vals, "Subset(%%d)")); #.FN_BODY Name @@ -364,8 +353,6 @@ OPERATION.&ResultType %(DEFAULT_BODY)s - if(check_col(actx->pinfo->cinfo, COL_INFO)) { - dn = x509if_get_last_dn(); - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", (dn && *dn) ? dn : "(root)"); - } + dn = x509if_get_last_dn(); + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", (dn && *dn) ? dn : "(root)"); diff --git a/asn1/disp/disp.cnf b/asn1/disp/disp.cnf index dcf3dde4f2..f55fcbb8b9 100644 --- a/asn1/disp/disp.cnf +++ b/asn1/disp/disp.cnf @@ -39,9 +39,7 @@ ModificationParameter S dop.oid "modify.roleb.2.5.19.1" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_T_standard_vals, "standard(%%d")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_T_standard_vals, "standard(%%d")); #.FN_PARS RefreshInformation VAL_PTR = &update @@ -51,9 +49,7 @@ ModificationParameter S dop.oid "modify.roleb.2.5.19.1" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RefreshInformation_vals, "unknown(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RefreshInformation_vals, "unknown(%%d)")); #.END @@ -63,9 +59,7 @@ ModificationParameter S dop.oid "modify.roleb.2.5.19.1" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_StandardUpdate_vals, "unknown(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_StandardUpdate_vals, "unknown(%%d)")); #.FN_PARS CoordinateShadowUpdateResult VAL_PTR = &update @@ -75,9 +69,7 @@ ModificationParameter S dop.oid "modify.roleb.2.5.19.1" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_CoordinateShadowUpdateResult_vals, "unknown(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_CoordinateShadowUpdateResult_vals, "unknown(%%d)")); #.FN_PARS RequestShadowUpdateResult VAL_PTR = &update @@ -87,9 +79,7 @@ ModificationParameter S dop.oid "modify.roleb.2.5.19.1" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RequestShadowUpdateResult_vals, "unknown(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_RequestShadowUpdateResult_vals, "unknown(%%d)")); #.FN_PARS UpdateShadowResult VAL_PTR = &update @@ -99,9 +89,7 @@ ModificationParameter S dop.oid "modify.roleb.2.5.19.1" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_UpdateShadowResult_vals, "unknown(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(update, disp_UpdateShadowResult_vals, "unknown(%%d)")); #.FN_PARS ShadowProblem VAL_PTR = &problem @@ -111,6 +99,4 @@ ModificationParameter S dop.oid "modify.roleb.2.5.19.1" %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, disp_ShadowProblem_vals, "ShadowProblem(%%d)")); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", val_to_str(problem, disp_ShadowProblem_vals, "ShadowProblem(%%d)")); diff --git a/asn1/disp/packet-disp-template.c b/asn1/disp/packet-disp-template.c index c32953c220..d6081a81ff 100644 --- a/asn1/disp/packet-disp-template.c +++ b/asn1/disp/packet-disp-template.c @@ -181,8 +181,7 @@ dissect_disp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } if(disp_dissector) { - if (check_col(pinfo->cinfo, COL_INFO)) - col_set_str(pinfo->cinfo, COL_INFO, disp_op_name); + col_set_str(pinfo->cinfo, COL_INFO, disp_op_name); while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; diff --git a/asn1/dop/dop.cnf b/asn1/dop/dop.cnf index cd770a302a..b4318750b2 100644 --- a/asn1/dop/dop.cnf +++ b/asn1/dop/dop.cnf @@ -173,9 +173,7 @@ OpBindingErrorParam/bindingType BindingType %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " id=%%d", value); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " id=%%d", value); @@ -184,9 +182,7 @@ OpBindingErrorParam/bindingType BindingType %(DEFAULT_BODY)s - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, ",%%d", value); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, ",%%d", value); #.FN_PARS Precedence VAL_PTR = &precedence diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c index 1990c8acdc..58e1e625dd 100644 --- a/asn1/dop/packet-dop-template.c +++ b/asn1/dop/packet-dop-template.c @@ -81,10 +81,8 @@ static void append_oid(packet_info *pinfo, const char *oid) { const char *name = NULL; - if(check_col(pinfo->cinfo, COL_INFO)) { name = oid_resolved_from_string(oid); col_append_fstr(pinfo->cinfo, COL_INFO, " %s", name ? name : oid); - } } #include "packet-dop-fn.c" @@ -96,8 +94,7 @@ call_dop_oid_callback(char *base_string, tvbuff_t *tvb, int offset, packet_info binding_param = ep_strdup_printf("%s.%s", base_string, binding_type ? binding_type : ""); - if (col_info && (check_col(pinfo->cinfo, COL_INFO))) - col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info); + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", col_info); if (dissector_try_string(dop_dissector_table, binding_param, tvb, pinfo, tree)) { offset += tvb_length_remaining (tvb, offset); @@ -222,8 +219,7 @@ dissect_dop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } if(dop_dissector) { - if (check_col(pinfo->cinfo, COL_INFO)) - col_set_str(pinfo->cinfo, COL_INFO, dop_op_name); + col_set_str(pinfo->cinfo, COL_INFO, dop_op_name); while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; diff --git a/asn1/dsp/packet-dsp-template.c b/asn1/dsp/packet-dsp-template.c index 2c5ed55435..465f3df7ec 100644 --- a/asn1/dsp/packet-dsp-template.c +++ b/asn1/dsp/packet-dsp-template.c @@ -253,8 +253,7 @@ dissect_dsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } if(dsp_dissector) { - if (check_col(pinfo->cinfo, COL_INFO)) - col_set_str(pinfo->cinfo, COL_INFO, dsp_op_name); + col_set_str(pinfo->cinfo, COL_INFO, dsp_op_name); while (tvb_reported_length_remaining(tvb, offset) > 0){ old_offset=offset; diff --git a/asn1/ftam/ftam.cnf b/asn1/ftam/ftam.cnf index 385e89b9b5..dfb2d0d50a 100644 --- a/asn1/ftam/ftam.cnf +++ b/asn1/ftam/ftam.cnf @@ -92,9 +92,7 @@ Legal-Qualification-Attribute/actual-values actual_values9 %(DEFAULT_BODY)s if( (branch_taken!=-1) && ftam_FTAM_Regime_PDU_vals[branch_taken].strptr ){ - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_FTAM_Regime_PDU_vals[branch_taken].strptr); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_FTAM_Regime_PDU_vals[branch_taken].strptr); } #.FN_BODY File-PDU VAL_PTR = &branch_taken @@ -103,9 +101,7 @@ Legal-Qualification-Attribute/actual-values actual_values9 %(DEFAULT_BODY)s if( (branch_taken!=-1) && ftam_File_PDU_vals[branch_taken].strptr ){ - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_File_PDU_vals[branch_taken].strptr); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_File_PDU_vals[branch_taken].strptr); } #.FN_BODY Bulk-Data-PDU VAL_PTR = &branch_taken @@ -114,9 +110,7 @@ Legal-Qualification-Attribute/actual-values actual_values9 %(DEFAULT_BODY)s if( (branch_taken!=-1) && ftam_Bulk_Data_PDU_vals[branch_taken].strptr ){ - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_Bulk_Data_PDU_vals[branch_taken].strptr); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_Bulk_Data_PDU_vals[branch_taken].strptr); } #.FN_BODY FSM-PDU VAL_PTR = &branch_taken @@ -125,7 +119,5 @@ Legal-Qualification-Attribute/actual-values actual_values9 %(DEFAULT_BODY)s if( (branch_taken!=-1) && ftam_FSM_PDU_vals[branch_taken].strptr ){ - if (check_col(actx->pinfo->cinfo, COL_INFO)) { - col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_FSM_PDU_vals[branch_taken].strptr); - } + col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s:", ftam_FSM_PDU_vals[branch_taken].strptr); } diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf index b3602a49b2..2b52a655a3 100644 --- a/asn1/h225/h225.cnf +++ b/asn1/h225/h225.cnf @@ -244,10 +244,8 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber contains_faststart = FALSE; call_id_guid = NULL; %(DEFAULT_BODY)s - if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){ - col_append_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "CS: %%s ", - val_to_str(message_body_val, T_h323_message_body_vals, "<unknown>")); - } + col_append_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "CS: %%s ", + val_to_str(message_body_val, T_h323_message_body_vals, "<unknown>")); if (h225_pi->msg_type == H225_CS) { /* Don't override msg_tag value from IRR */ @@ -287,10 +285,8 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber gint32 rasmessage_value; %(DEFAULT_BODY)s - if (check_col(%(ACTX)s->pinfo->cinfo, COL_INFO)){ - col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "RAS: %%s ", - val_to_str(rasmessage_value, h225_RasMessage_vals, "<unknown>")); - } + col_add_fstr(%(ACTX)s->pinfo->cinfo, COL_INFO, "RAS: %%s ", + val_to_str(rasmessage_value, h225_RasMessage_vals, "<unknown>")); h225_pi->msg_tag = rasmessage_value; #.END |