diff options
author | Simon Busch <morphis@gravedo.de> | 2011-10-30 20:40:33 +0100 |
---|---|---|
committer | Simon Busch <morphis@gravedo.de> | 2011-10-30 20:40:33 +0100 |
commit | 644af30baa8bd6311f1fd67a86792b6c6195b1b3 (patch) | |
tree | 97a7c8560845ce0aaa0c176055bd0d3361d5dfe1 /samsung-ipc | |
parent | f1262be313c01fd26ef94fc32d6d81ac7901ee3c (diff) | |
download | external_libsamsung-ipc-644af30baa8bd6311f1fd67a86792b6c6195b1b3.zip external_libsamsung-ipc-644af30baa8bd6311f1fd67a86792b6c6195b1b3.tar.gz external_libsamsung-ipc-644af30baa8bd6311f1fd67a86792b6c6195b1b3.tar.bz2 |
Only print hexdump for messages when build in debug mode
Signed-off-by: Simon Busch <morphis@gravedo.de>
Diffstat (limited to 'samsung-ipc')
-rw-r--r-- | samsung-ipc/device/crespo/crespo_ipc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/samsung-ipc/device/crespo/crespo_ipc.c b/samsung-ipc/device/crespo/crespo_ipc.c index 719383e..37f3575 100644 --- a/samsung-ipc/device/crespo/crespo_ipc.c +++ b/samsung-ipc/device/crespo/crespo_ipc.c @@ -313,7 +313,7 @@ int crespo_ipc_client_send(struct ipc_client *client, struct ipc_message_info *r modem_data.data = malloc(reqhdr.length); memcpy(modem_data.data, &reqhdr, sizeof(struct ipc_header)); - memcpy((unsigned char *)modem_data.data + sizeof(struct ipc_header), request->data, request->length); + memcpy((unsigned char *) (modem_data.data + sizeof(struct ipc_header)), request->data, request->length); assert(client->handlers->write != NULL); @@ -321,11 +321,13 @@ int crespo_ipc_client_send(struct ipc_client *client, struct ipc_message_info *r ipc_client_log(client, "INFO: crespo_ipc_client_send: request: type = %d (%s), group = %d, index = %d (%s)", request->type, ipc_request_type_to_str(request->type), request->group, request->index, ipc_command_type_to_str(IPC_COMMAND(request))); +#ifdef DEBUG if(request->length > 0) { ipc_client_log(client, "INFO: ==== DATA DUMP ===="); hex_dump((void *) request->data, request->length); } +#endif ipc_client_log(client, ""); @@ -402,8 +404,10 @@ int crespo_ipc_client_recv(struct ipc_client *client, struct ipc_message_info *r if(response->length > 0) { +#ifdef DEBUG ipc_client_log(client, "INFO: ==== DATA DUMP ===="); hex_dump((void *) (modem_data.data + sizeof(struct ipc_header)), response->length); +#endif response->data = malloc(response->length); memcpy(response->data, (uint8_t *) modem_data.data + sizeof(struct ipc_header), response->length); } |