summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2018-11-04 17:14:32 +0100
committerAleksander Morgado <aleksander@aleksander.es>2018-11-04 17:16:01 +0100
commit61b3f09e417e4f6131a763094960a7d45bb4fc56 (patch)
tree3d5003f4b1a1cc85df32075d6f3db43b1ebd6569
parent88d2cddb9d7861e59219400a4e4ff453cdd32d20 (diff)
downloadlibmbim-61b3f09e417e4f6131a763094960a7d45bb4fc56.tar.gz
mbim-codegen: don't print response contents if an error is being reported
[04 nov 2018, 16:54:27] [Debug] [/dev/cdc-wdm2] Received message... >>>>>> RAW: >>>>>> length = 48 >>>>>> data = 03:00:00:80:30:00:00:00:13:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:13:00:00:00:22:00:00:00:00:00:00:00 (mbim-proxy:14139): GLib-ERROR **: 16:54:27.373: ../glib/glib/gmem.c:105: failed to allocate 33235360392 bytes
-rw-r--r--build-aux/mbim-codegen/Message.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/build-aux/mbim-codegen/Message.py b/build-aux/mbim-codegen/Message.py
index 8ff58ea..a928f19 100644
--- a/build-aux/mbim-codegen/Message.py
+++ b/build-aux/mbim-codegen/Message.py
@@ -843,6 +843,12 @@ class Message:
inner_template = (' guint32 _${field};\n')
template += (string.Template(inner_template).substitute(translations))
+ if message_type == 'response':
+ template += (
+ '\n'
+ ' if (!mbim_message_response_get_result (message, MBIM_MESSAGE_TYPE_COMMAND_DONE, NULL))\n'
+ ' return NULL;\n')
+
template += (
'\n'
' str = g_string_new ("");\n')