diff options
author | Denis Kenzior <denkenz@gmail.com> | 2015-12-16 11:39:53 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2015-12-16 11:39:53 -0600 |
commit | d9ed2eab19ef01de045d92fcda3726138a1e426f (patch) | |
tree | e525353e88b144c46b6b896f527cbfd02c4dd8b1 | |
parent | 8e40ef7e1f3a3adffb0986414776cd7696166e7e (diff) | |
download | ofono-d9ed2eab19ef01de045d92fcda3726138a1e426f.tar.bz2 |
ril: Use g_ril_new_with_ucred
-rw-r--r-- | plugins/ril.c | 9 |
1 files changed, 8 insertions, 1 deletions
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 |