summaryrefslogtreecommitdiff
path: root/src/gsmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/gsmd')
-rw-r--r--src/gsmd/usock.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c
index 13c3bb1..f258fd6 100644
--- a/src/gsmd/usock.c
+++ b/src/gsmd/usock.c
@@ -43,6 +43,8 @@
#include <gsmd/ts0707.h>
#include <gsmd/sms.h>
+extern int loglevel;
+
static void *__ucmd_ctx, *__gu_ctx;
struct gsmd_ucmd *ucmd_alloc(int extra_size)
@@ -765,6 +767,14 @@ static int usock_rcv_phone(struct gsmd_user *gu, struct gsmd_msg_hdr *gph,
cmd = atcmd_fill("AT+CVIB=0", 9+1, &phone_vibrator_disable_cb, gu, 0, NULL);
gu->gsmd->dev_state.vibrator = 0;
break;
+ case GSMD_PHONE_GSMD_LOGLEVEL:
+ if (gph->len < 1)
+ return -EINVAL;
+ gsmd_log(GSMD_NOTICE, "Setting loglevel to %u on client "
+ "request\n", gph->data[0]);
+ loglevel = gph->data[0];
+ return 0;
+ break;
default:
return -EINVAL;
}
personal git repositories of Harald Welte. Your mileage may vary