1 From 6c206b12570762126bf0a35f6c0054edc14aa14b Mon Sep 17 00:00:00 2001
2 From: Philippe Nunes <philippe.nunes@linux.intel.com>
3 Date: Fri, 11 Jan 2013 17:20:31 +0100
4 Subject: [PATCH 20/23] s_sim.c: Fix get lock info
5 Content-Type: text/plain; charset="utf-8"
6 Content-Transfer-Encoding: 8bit
8 The "lock_type" parameter used by the AT command AT+XPINCNT[=lock_type]
9 shall be an integer type when used with our PR3 modem whereas this is
10 a string for the Lunchbox modem.
12 src/s_sim.c | 18 +++++++++---------
13 1 file changed, 9 insertions(+), 9 deletions(-)
15 diff --git a/src/s_sim.c b/src/s_sim.c
16 index a74bf7c..a96594b 100644
19 @@ -2961,7 +2961,7 @@ static TReturn s_get_lock_info(CoreObject *o, UserRequest *ur)
20 TcoreATRequest *req = NULL;
21 TcorePending *pending = NULL;
23 - char *lock_type = NULL;
25 const struct treq_sim_get_lock_info *req_data;
26 struct s_sim_property *sp = NULL;
28 @@ -2981,37 +2981,37 @@ static TReturn s_get_lock_info(CoreObject *o, UserRequest *ur)
30 switch (req_data->type) {
33 + lock_type = 9; // IMSI lock
69 - cmd_str = g_strdup_printf("AT+XPINCNT =\"%s\"", lock_type);
70 + cmd_str = g_strdup_printf("AT+XPINCNT =%d", lock_type);
71 req = tcore_at_request_new(cmd_str, "+XPINCNT:", TCORE_AT_SINGLELINE);
73 dbg("cmd : %s, prefix(if any) :%s, cmd_len : %d", req->cmd, req->prefix, strlen(req->cmd));