From 4359a48ca6b4517161b9bb771bfb0a8d06cdceac Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 23 Dec 2016 23:56:26 +0100 Subject: [PATCH] rename dump_log() to diag_rx_ext_msg_f() there is too many things called log. Let's align more closely with how diag calls things. This function is about handling the extended message service, which is basically a 'remote printf'. --- src/qxdm-log.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qxdm-log.c b/src/qxdm-log.c index 0423092..ad797f8 100644 --- a/src/qxdm-log.c +++ b/src/qxdm-log.c @@ -27,14 +27,15 @@ #include "gprs_mac.h" #include "qmi_decode.h" -static int dump_log(const uint8_t *data, const size_t len) +/* handler for EXT MSG */ +static int diag_rx_ext_msg_f(const uint8_t *data, const size_t len) { const struct ext_log_msg *msg; const char *file = NULL, *fmt; unsigned int num_args; if (len < sizeof(struct ext_log_msg)) { - printf("too short log message.\n"); + printf("too short ext_log_msg.\n"); return -1; } @@ -307,7 +308,7 @@ static void diag_process_msg(struct diag_instance *di, struct msgb *msg) diag_log_handle(msg); break; case DIAG_EXT_MSG_F: - dump_log(msgb_data(msg), msgb_length(msg)); + diag_rx_ext_msg_f(msgb_data(msg), msgb_length(msg)); break; default: printf("Got %d bytes data of unknown payload type 0x%02x\n",