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'.
This commit is contained in:
Harald Welte 2016-12-23 23:56:26 +01:00
parent 234b56b477
commit 4359a48ca6
1 changed files with 4 additions and 3 deletions

View File

@ -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",