aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc-spoolss.c
diff options
context:
space:
mode:
authorStephen Fisher <steve@stephen-fisher.com>2011-01-28 20:15:41 +0000
committerStephen Fisher <steve@stephen-fisher.com>2011-01-28 20:15:41 +0000
commitfd1e26d285f699ed059a78d628207efb1bbaaf4a (patch)
treeb0d815df8662dea7b33d91c57ea4ea66cb8e3100 /epan/dissectors/packet-dcerpc-spoolss.c
parent42dbbb90902bc4b2b3a1e2e0ef6cc5b96ef7c1e0 (diff)
Remove the remaining tvb_fake_unicode() calls in the dissector source.
svn path=/trunk/; revision=35692
Diffstat (limited to 'epan/dissectors/packet-dcerpc-spoolss.c')
-rw-r--r--epan/dissectors/packet-dcerpc-spoolss.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/epan/dissectors/packet-dcerpc-spoolss.c b/epan/dissectors/packet-dcerpc-spoolss.c
index 201eada6f6..a701d3146a 100644
--- a/epan/dissectors/packet-dcerpc-spoolss.c
+++ b/epan/dissectors/packet-dcerpc-spoolss.c
@@ -646,7 +646,7 @@ dissect_printerdata_data(tvbuff_t *tvb, int offset,
switch(type) {
case DCERPC_REG_SZ: {
- char *data = tvb_fake_unicode(tvb, offset - size, size/2, TRUE);
+ char *data = tvb_get_unicode_string(tvb, offset - size, size, ENC_LITTLE_ENDIAN);
proto_item_append_text(item, ": %s", data);
@@ -1028,11 +1028,6 @@ SpoolssSetPrinterDataEx_r(tvbuff_t *tvb, int offset,
return offset;
}
-/* Yet another way to represent a unicode string - sheesh. This function
- dissects a NULL terminate unicode string at the current offset and
- returns the (char *) equivalent. This really should return UTF8 or
- something but we use tvb_fake_unicode() instead. */
-
/* XXX - "name" should be an hf_ value for an FT_STRING. */
static int
dissect_spoolss_uint16uni(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
@@ -1047,8 +1042,8 @@ dissect_spoolss_uint16uni(tvbuff_t *tvb, int offset, packet_info *pinfo _U_,
/* Get remaining data in buffer as a string */
- remaining = tvb_length_remaining(tvb, offset) / 2;
- text = tvb_fake_unicode(tvb, offset, remaining, TRUE);
+ remaining = tvb_length_remaining(tvb, offset);
+ text = tvb_get_unicode_string(tvb, offset, remaining, ENC_LITTLE_ENDIAN);
len = (int)strlen(text);
proto_tree_add_text(tree, tvb, offset, len * 2, "%s: %s",
@@ -5877,8 +5872,8 @@ cb_notify_str_postprocess(packet_info *pinfo _U_,
len = tvb_get_letohl(tvb, start_offset);
- s = tvb_fake_unicode(
- tvb, start_offset + 4, (end_offset - start_offset - 4) / 2, TRUE);
+ s = tvb_get_unicode_string(
+ tvb, start_offset + 4, (end_offset - start_offset - 4), TRUE);
/* Append string to upper-level proto_items */