From d9ed2eab19ef01de045d92fcda3726138a1e426f Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 16 Dec 2015 11:39:53 -0600 Subject: [PATCH] ril: Use g_ril_new_with_ucred --- plugins/ril.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/ril.c b/plugins/ril.c index 9e0a86b0..ea50d76a 100644 --- a/plugins/ril.c +++ b/plugins/ril.c @@ -64,6 +64,9 @@ #include "drivers/rilmodem/rilmodem.h" #include "drivers/rilmodem/vendor.h" +#define RADIO_GID 1001 +#define RADIO_UID 1001 + #define MAX_SIM_STATUS_RETRIES 15 /* this gives 30s for rild to initialize */ @@ -341,7 +344,11 @@ static int create_gril(struct ofono_modem *modem) ofono_info("Using %s as socket for slot %d.", RILD_CMD_SOCKET[slot_id], slot_id); - rd->ril = g_ril_new(RILD_CMD_SOCKET[slot_id], OFONO_RIL_VENDOR_AOSP); + + /* RIL expects user radio to connect to the socket */ + rd->ril = g_ril_new_with_ucred(RILD_CMD_SOCKET[slot_id], + OFONO_RIL_VENDOR_AOSP, + RADIO_UID, RADIO_GID); /* NOTE: Since AT modems open a tty, and then call * g_at_chat_new(), they're able to return -EIO if