summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2013-04-26 21:20:19 +0530
committerHarald Welte <laforge@gnumonks.org>2013-04-26 21:20:19 +0530
commitef770471dcde812c0de348e75cdb18268fa8a70f (patch)
treee4940c9a29c957f40f061b06d77707b7c1d5adb5
parenteef6ce439727436febc67692c145e07847cc4c89 (diff)
Fix error in MTP3MG parsing code
The MTP3MG payload is not the MTP3 payload, but only what is remaining after the MTP3MG header has been parsed.
-rw-r--r--src/mtp3_codec.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mtp3_codec.erl b/src/mtp3_codec.erl
index cc83d86..49d575e 100644
--- a/src/mtp3_codec.erl
+++ b/src/mtp3_codec.erl
@@ -76,7 +76,7 @@ decode_payload(?MTP3_SERV_MTN, Payload) ->
#mtp3mg_msg{h0 = H0, h1 = H1, payload = TP};
decode_payload(?MTP3_SERV_MGMT, Payload) ->
<<H1:4, H0:4, Remain/binary>> = Payload,
- #mtp3mg_msg{h0 = H0, h1 = H1, payload = Payload};
+ #mtp3mg_msg{h0 = H0, h1 = H1, payload = Remain};
decode_payload(_, Payload) ->
Payload.