aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-22 19:01:01 +0000
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>2012-08-22 19:01:01 +0000
commit5109a8e8a4fded39520d46196938ed73243292bf (patch)
tree13044516df27ef7ce4d9c588d92ca9bf800e8fa5 /epan
parentbd3ac8aa378c4c534f2604fd1289e411cb2cd85a (diff)
proto_item_append_string() doesn't work this case, so stop using it.
I am tempted though to chage proto_item_append_string() just be like proto_item_append_text() without the call to g_vsnprintf(), which is the expensize part I was hoping to avoid. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@44614 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-mac-lte.c34
-rw-r--r--epan/dissectors/packet-pdcp-lte.c4
-rw-r--r--epan/dissectors/packet-rlc-lte.c10
3 files changed, 24 insertions, 24 deletions
diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c
index e1d1303554..8873c07823 100644
--- a/epan/dissectors/packet-mac-lte.c
+++ b/epan/dissectors/packet-mac-lte.c
@@ -1308,10 +1308,10 @@ static void write_pdu_label_and_info(proto_item *ti1, proto_item *ti2,
col_append_str(pinfo->cinfo, COL_INFO, info_buffer);
}
if (ti1 != NULL) {
- proto_item_append_string(ti1, info_buffer);
+ proto_item_append_text(ti1, "%s", info_buffer);
}
if (ti2 != NULL) {
- proto_item_append_string(ti2, info_buffer);
+ proto_item_append_text(ti2, "%s", info_buffer);
}
}
@@ -1369,7 +1369,7 @@ static void show_extra_phy_parameters(packet_info *pinfo, tvbuff_t *tvb, proto_t
PROTO_ITEM_SET_GENERATED(ti);
- proto_item_append_string(phy_ti, " (");
+ proto_item_append_text(phy_ti, " (");
write_pdu_label_and_info(phy_ti, NULL,
(global_mac_lte_layer_to_show == ShowPHYLayer) ? pinfo : NULL,
@@ -1382,7 +1382,7 @@ static void show_extra_phy_parameters(packet_info *pinfo, tvbuff_t *tvb, proto_t
p_mac_lte_info->detailed_phy_info.ul_info.resource_block_length,
p_mac_lte_info->detailed_phy_info.ul_info.resource_block_start);
- proto_item_append_string(phy_ti, ")");
+ proto_item_append_text(phy_ti, ")");
/* Don't want columns to be replaced now */
if (global_mac_lte_layer_to_show == ShowPHYLayer) {
@@ -1456,7 +1456,7 @@ static void show_extra_phy_parameters(packet_info *pinfo, tvbuff_t *tvb, proto_t
PROTO_ITEM_SET_GENERATED(ti);
- proto_item_append_string(phy_ti, " (");
+ proto_item_append_text(phy_ti, " (");
write_pdu_label_and_info(phy_ti, NULL,
(global_mac_lte_layer_to_show == ShowPHYLayer) ? pinfo : NULL,
@@ -1476,7 +1476,7 @@ static void show_extra_phy_parameters(packet_info *pinfo, tvbuff_t *tvb, proto_t
crc_status_vals, "Unknown"),
p_mac_lte_info->detailed_phy_info.dl_info.harq_id,
p_mac_lte_info->detailed_phy_info.dl_info.ndi);
- proto_item_append_string(phy_ti, ")");
+ proto_item_append_text(phy_ti, ")");
/* Don't want columns to be replaced now */
if (global_mac_lte_layer_to_show == ShowPHYLayer) {
@@ -1694,7 +1694,7 @@ static void dissect_rar(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
val_to_str_const(backoff_indicator, rar_bi_vals, "Illegal-value "));
}
else {
- proto_item_append_string(rar_headers_ti, ")");
+ proto_item_append_text(rar_headers_ti, ")");
}
/* Set length for headers root */
@@ -2876,14 +2876,14 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
switch (pdu_lengths[number_of_headers]) {
case -1:
- proto_item_append_string(pdu_subheader_ti, ", length is remainder)");
+ proto_item_append_text(pdu_subheader_ti, ", length is remainder)");
proto_item_append_text(pdu_header_ti, " (%s:remainder)",
val_to_str_const(lcids[number_of_headers],
(direction == DIRECTION_UPLINK) ? ulsch_lcid_vals : dlsch_lcid_vals,
"Unknown"));
break;
case 0:
- proto_item_append_string(pdu_subheader_ti, ")");
+ proto_item_append_text(pdu_subheader_ti, ")");
proto_item_append_text(pdu_header_ti, " (%s)",
val_to_str_const(lcids[number_of_headers],
(direction == DIRECTION_UPLINK) ? ulsch_lcid_vals : dlsch_lcid_vals,
@@ -3058,7 +3058,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Now show CR result in tree */
switch (crResult->status) {
case NoMsg3:
- proto_item_append_string(cr_ti, " (no corresponding Msg3 found!)");
+ proto_item_append_text(cr_ti, " (no corresponding Msg3 found!)");
break;
case Msg3Match:
@@ -3664,7 +3664,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
break;
}
}
- proto_item_append_string(sdu_ti, buff);
+ proto_item_append_text(sdu_ti, "%s", buff);
}
offset += data_length;
@@ -3908,14 +3908,14 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
switch (pdu_lengths[number_of_headers]) {
case -1:
- proto_item_append_string(pdu_subheader_ti, ", length is remainder)");
+ proto_item_append_text(pdu_subheader_ti, ", length is remainder)");
proto_item_append_text(pdu_header_ti, " (%s:remainder)",
val_to_str_const(lcids[number_of_headers],
mch_lcid_vals,
"Unknown"));
break;
case 0:
- proto_item_append_string(pdu_subheader_ti, ")");
+ proto_item_append_text(pdu_subheader_ti, ")");
proto_item_append_text(pdu_header_ti, " (%s)",
val_to_str_const(lcids[number_of_headers],
mch_lcid_vals,
@@ -4002,10 +4002,10 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
ti = proto_tree_add_item(mch_sched_info_tree, hf_mac_lte_control_mch_scheduling_info_stop_mtch,
tvb, curr_offset, 2, ENC_BIG_ENDIAN);
if ((stop_mtch_val >= 2043) && (stop_mtch_val <= 2046)) {
- proto_item_append_string(ti, " (reserved)");
+ proto_item_append_text(ti, " (reserved)");
}
else if (stop_mtch_val == 2047) {
- proto_item_append_string(ti, " (MTCH is not scheduled)");
+ proto_item_append_text(ti, " (MTCH is not scheduled)");
}
curr_offset += 2;
}
@@ -4071,7 +4071,7 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro
break;
}
}
- proto_item_append_string(sdu_ti, buff);
+ proto_item_append_text(sdu_ti, "%s", buff);
offset += data_length;
}
@@ -4135,7 +4135,7 @@ void dissect_mac_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Create protocol tree. */
pdu_ti = proto_tree_add_item(tree, proto_mac_lte, tvb, offset, -1, ENC_NA);
- proto_item_append_string(pdu_ti, " ");
+ proto_item_append_text(pdu_ti, " ");
mac_lte_tree = proto_item_add_subtree(pdu_ti, ett_mac_lte);
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index 4a734b4ddf..90219d7064 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -401,7 +401,7 @@ static void addChannelSequenceInfo(pdcp_sequence_report_in_frame *p,
ti = proto_tree_add_boolean(seqnum_tree, hf_pdcp_lte_sequence_analysis_ok,
tvb, 0, 0, TRUE);
PROTO_ITEM_SET_GENERATED(ti);
- proto_item_append_string(seqnum_ti, " - OK");
+ proto_item_append_text(seqnum_ti, " - OK");
/* Link to next SN in channel (if known) */
if (p->nextFrameNum != 0) {
@@ -632,7 +632,7 @@ static void write_pdu_label_and_info(proto_item *pdu_ti,
/* Add to indicated places */
col_append_str(pinfo->cinfo, COL_INFO, info_buffer);
- proto_item_append_string(pdu_ti, info_buffer);
+ proto_item_append_text(pdu_ti, "%s", info_buffer);
}
diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c
index ac98dcb3c0..4b7e9a2c08 100644
--- a/epan/dissectors/packet-rlc-lte.c
+++ b/epan/dissectors/packet-rlc-lte.c
@@ -613,9 +613,9 @@ static void write_pdu_label_and_info(proto_item *pdu_ti, proto_item *sub_ti,
/* Add to indicated places */
col_append_str(pinfo->cinfo, COL_INFO, info_buffer);
- proto_item_append_string(pdu_ti, info_buffer);
+ proto_item_append_text(pdu_ti, "%s", info_buffer);
if (sub_ti != NULL) {
- proto_item_append_string(sub_ti, info_buffer);
+ proto_item_append_text(sub_ti, "%s", info_buffer);
}
}
@@ -931,7 +931,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p,
ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_ok,
tvb, 0, 0, TRUE);
PROTO_ITEM_SET_GENERATED(ti);
- proto_item_append_string(seqnum_ti, " - OK");
+ proto_item_append_text(seqnum_ti, " - OK");
/* Link to next SN in channel (if known) */
if (p->nextFrameNum != 0) {
@@ -1152,7 +1152,7 @@ static void addChannelSequenceInfo(sequence_analysis_report *p,
ti = proto_tree_add_boolean(seqnum_tree, hf_rlc_lte_sequence_analysis_ok,
tvb, 0, 0, TRUE);
PROTO_ITEM_SET_GENERATED(ti);
- proto_item_append_string(seqnum_ti, " - OK");
+ proto_item_append_text(seqnum_ti, " - OK");
/* Link to next SN in channel (if known) */
if (p->nextFrameNum != 0) {
@@ -2316,7 +2316,7 @@ static void dissect_rlc_lte_am(tvbuff_t *tvb, packet_info *pinfo,
write_pdu_label_and_info(top_ti, NULL, pinfo, (polling) ? " (P) " : " ");
if (polling) {
- proto_item_append_string(am_header_ti, " (P) ");
+ proto_item_append_text(am_header_ti, " (P) ");
}
/* Framing Info */