From f3e660444c70ea35bdb7f6358301450ec15d0140 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 20 Mar 2010 00:58:14 -0700 Subject: [PATCH] core: fix 64-bit build error in QCDM packet decapsulation --- src/mm-qcdm-serial-port.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mm-qcdm-serial-port.c b/src/mm-qcdm-serial-port.c index 161a4768..e2ca156e 100644 --- a/src/mm-qcdm-serial-port.c +++ b/src/mm-qcdm-serial-port.c @@ -71,6 +71,7 @@ handle_response (MMSerialPort *port, if (!error) { gboolean more = FALSE, success; + gsize unescaped_len = 0; /* FIXME: don't munge around with byte array internals */ unescaped = g_byte_array_sized_new (1024); @@ -78,7 +79,7 @@ handle_response (MMSerialPort *port, response->len, (char *) unescaped->data, 1024, - &unescaped->len, + &unescaped_len, &used, &more); if (!success) { @@ -90,6 +91,9 @@ handle_response (MMSerialPort *port, * function checks for the end-of-frame marker, but whatever. */ return 0; + } else { + /* Successfully decapsulated the DM command */ + unescaped->len = (guint) unescaped_len; } }