aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_sms.c
diff options
context:
space:
mode:
authorOlivier Biot <obiot.ethereal@gmail.com>2004-12-11 23:47:12 +0000
committerOlivier Biot <obiot.ethereal@gmail.com>2004-12-11 23:47:12 +0000
commit718c4f1ef2008b4a87cf869f2511c9d68b022b11 (patch)
tree46437c42daac0e2979dd30daadc289a31b9a6786 /epan/dissectors/packet-gsm_sms.c
parentfb77ff6d54ea37e626460a782c44d934f7a337a9 (diff)
From Victor Stratan:
GSM SMS fixes: - Made Timezone view human readable based on 3GPP TS 23.040 V6.5.0 (9.2.3.11). - TP-UDHI field - located within bit no 6 one more place was left over from previous patch by Viorel Suman made on 9 Dec 2004. svn path=/trunk/; revision=12718
Diffstat (limited to 'epan/dissectors/packet-gsm_sms.c')
-rw-r--r--epan/dissectors/packet-gsm_sms.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c
index 958bacc932..9a3cc73d80 100644
--- a/epan/dissectors/packet-gsm_sms.c
+++ b/epan/dissectors/packet-gsm_sms.c
@@ -730,6 +730,7 @@ static void
dis_field_scts_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
{
guint8 oct, oct2, oct3;
+ char sign;
oct = tvb_get_guint8(tvb, offset);
@@ -766,10 +767,13 @@ dis_field_scts_aux(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
oct = tvb_get_guint8(tvb, offset);
+ sign = (oct & 0x08)?'-':'+';
+ oct = ((oct >> 4) + (oct & 0x07) * 10) * 15;
+
proto_tree_add_text(tree,
tvb, offset, 1,
- "Timezone %d",
- oct);
+ "Timezone: GMT %c %d hours %d minutes",
+ sign, oct / 60, oct % 60);
}
/* 9.2.3.11 */
@@ -2415,9 +2419,9 @@ dis_msg_command(tvbuff_t *tvb, proto_tree *tree, guint32 offset)
oct = tvb_get_guint8(tvb, offset);
- DIS_FIELD_SRR(tree, 0x20, offset);
+ DIS_FIELD_UDHI(tree, 0x40, offset, udhi);
- DIS_FIELD_UDHI(tree, 0x04, offset, udhi);
+ DIS_FIELD_SRR(tree, 0x20, offset);
DIS_FIELD_MTI(tree, 0x03, offset);