diff options
Diffstat (limited to 'src/libgsmd')
-rw-r--r-- | src/libgsmd/libgsmd_phone.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/libgsmd/libgsmd_phone.c b/src/libgsmd/libgsmd_phone.c index a67642a..9f6569c 100644 --- a/src/libgsmd/libgsmd_phone.c +++ b/src/libgsmd/libgsmd_phone.c @@ -1,6 +1,7 @@ /* libgsmd phone related functions * * (C) 2006-2007 by OpenMoko, Inc. + * (C) 2013 by Harald Welte * Written by Harald Welte <laforge@openmoko.org> * All Rights Reserved * @@ -90,4 +91,20 @@ int lgsm_phone_vibrator(struct lgsm_handle *lh, int enable) return lgsm_send_simple(lh, GSMD_MSG_PHONE, type); } - + +int lgsm_set_gsmd_loglevel(struct lgsm_handle *lh, u_int8_t loglevel) +{ + struct gsmd_msg_hdr *gmh; + int rc; + + gmh = lgsm_gmh_fill(GSMD_MSG_PHONE, GSMD_PHONE_GSMD_LOGLEVEL, 1); + if (!gmh) + return -ENOMEM; + + gmh->data[0] = loglevel; + + rc = lgsm_send(lh, gmh); + + lgsm_gmh_free(gmh); + return rc; +} |