[PATCH 0/5 v4] Neighbor Cell Info Atom
by Antti Paila
This series of patches implements an interface for client
applications to fetch the ECID information of neighboring
cells using DBUS. Since the 1st version the DBUS api has
been refactored to use new naming for method and to use
flat data format for the cell information. Also, the
internal datatypes have been optimized. Since the 2nd
version MNC and MCC are converted to strings and CPICH-RSCP
re-typed. Since 3rd version multiradio support is added and
interfaces are renamed.
Antti Paila (5):
cell-info: CellInfo DBUS interface definition
cell-info: Header files for neighbor cell info
cell-info: Atom for neighbor cell info
cell-info: New files included in compilation
cell-info: Documentation
Makefile.am | 9 +-
doc/cell-info.txt | 122 +++++++++++++
include/cell-info.h | 126 ++++++++++++++
include/dbus.h | 1 +
src/cell-info.c | 475 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/ofono.h | 1 +
6 files changed, 731 insertions(+), 3 deletions(-)
create mode 100644 doc/cell-info.txt
create mode 100644 include/cell-info.h
create mode 100644 src/cell-info.c
11 years, 3 months
[PATCH 1/3] mbmmodem: close chat before sending fd
by Lucas De Marchi
---
drivers/mbmmodem/location-reporting.c | 44 ++++++++++++++++++---------------
1 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/drivers/mbmmodem/location-reporting.c b/drivers/mbmmodem/location-reporting.c
index 941fac4..b671d71 100644
--- a/drivers/mbmmodem/location-reporting.c
+++ b/drivers/mbmmodem/location-reporting.c
@@ -48,7 +48,7 @@ static const char *e2gpsctl_prefix[] = { "*E2GPSCTL:", NULL };
struct gps_data {
GAtChat *chat;
- GAtChat *data_chat;
+ GIOChannel *data_channel;
};
static void mbm_e2gpsctl_disable_cb(gboolean ok, GAtResult *result,
@@ -70,7 +70,7 @@ static void mbm_e2gpsctl_disable_cb(gboolean ok, GAtResult *result,
return;
}
- g_at_chat_unref(gd->data_chat);
+ g_io_channel_unref(gd->data_channel);
CALLBACK_WITH_SUCCESS(cb, cbd->data);
}
@@ -94,33 +94,33 @@ static void mbm_location_reporting_disable(struct ofono_location_reporting *lr,
g_free(cbd);
}
-static int mbm_create_data_chat(struct ofono_location_reporting *lr)
+static GAtChat *mbm_create_data_chat(struct ofono_location_reporting *lr)
{
struct gps_data *gd = ofono_location_reporting_get_data(lr);
struct ofono_modem *modem;
const char *gps_dev;
GAtSyntax *syntax;
- GIOChannel *channel;
- int fd;
+ GAtChat *chat;
modem = ofono_location_reporting_get_modem(lr);
gps_dev = ofono_modem_get_string(modem, "GPSDevice");
- channel = g_at_tty_open(gps_dev, NULL);
- if (channel == NULL)
- return -1;
+ gd->data_channel = g_at_tty_open(gps_dev, NULL);
+ if (gd->data_channel == NULL)
+ return NULL;
syntax = g_at_syntax_new_gsm_permissive();
- gd->data_chat = g_at_chat_new(channel, syntax);
- fd = g_io_channel_unix_get_fd(channel);
+ chat = g_at_chat_new(gd->data_channel, syntax);
g_at_syntax_unref(syntax);
- g_io_channel_unref(channel);
- if (gd->data_chat == NULL)
- return -1;
+ if (chat == NULL) {
+ g_io_channel_unref(gd->data_channel);
+
+ return NULL;
+ }
- return fd;
+ return chat;
}
static void mbm_e2gpsctl_enable_cb(gboolean ok, GAtResult *result,
@@ -131,7 +131,7 @@ static void mbm_e2gpsctl_enable_cb(gboolean ok, GAtResult *result,
struct ofono_location_reporting *lr = cbd->user;
struct gps_data *gd = ofono_location_reporting_get_data(lr);
struct ofono_error error;
- int fd;
+ GAtChat *chat;
DBG("lr=%p ok=%d", lr, ok);
@@ -143,18 +143,22 @@ static void mbm_e2gpsctl_enable_cb(gboolean ok, GAtResult *result,
return;
}
- fd = mbm_create_data_chat(lr);
-
- if (fd < 0)
+ chat = mbm_create_data_chat(lr);
+ if (chat == NULL)
goto out;
- if (g_at_chat_send(gd->data_chat, "AT*E2GPSNPD", NULL, NULL, NULL,
- NULL) > 0) {
+ if (g_at_chat_send(chat, "AT*E2GPSNPD", NULL, NULL, NULL, NULL) > 0) {
+ int fd = g_io_channel_unix_get_fd(gd->data_channel);
+
+ g_at_chat_unref(chat);
cb(&error, fd, cbd->data);
return;
}
+ g_at_chat_unref(chat);
+ g_io_channel_unref(gd->data_channel);
+
out:
CALLBACK_WITH_FAILURE(cb, -1, cbd->data);
}
--
1.7.4.1
11 years, 3 months
[PATCH v2 00/18] wgmodem2.5 support
by Andreas Westin
Hi,
Second go on the patches for wgmodem2.5, please review.
Note that we are still working on the changes for pipe/pep and CBS, having some
problems with testing them so those patches are not updated in this set just
included to ensure no conflicts.
Cheers
Andreas
Jessica Nilsson (18):
gisi: pipe and pep for wgmodem2.5
isimodem: added codepoints for u8500
plugins: add plugin for u8500
plugins: add u8500 to udev
gisi: add getter and setter for sim
src: add missing SIM enum to simutil.h
isimodem: code points uicc sim wgmodem2.5
isimodem: UICC sim support for wgmodem2.5
isimodem: clip colp clir colr wgmodem2.5
isimodem: wgmodem2.5 added to voicecall
isimodem: wgmodem2.5 support in USSD
isimodem: SS_GSM_BARRING_INFO added
isimodem: wgmodem2.5 added to call-forwarding
isimodem: wgmodem2.5 added to ssn
isimodem: code points for sms wgmodem2.5
isimodem: sms updated with wgmodem2.5
isimodem: CBS for wgmodem2.5
isimodem: initial support for UICC phonebook
Makefile.am | 7 +-
drivers/isimodem/call-barring.c | 99 ++-
drivers/isimodem/call-forwarding.c | 28 +-
drivers/isimodem/call-settings.c | 711 ++++++++++-
drivers/isimodem/call.h | 89 ++
drivers/isimodem/cbs.c | 414 +++++-
drivers/isimodem/debug.c | 149 ++
drivers/isimodem/debug.h | 2 +
drivers/isimodem/info.h | 3 +
drivers/isimodem/phonebook.c | 1273 +++++++++++++++++-
drivers/isimodem/sim.c | 2678 +++++++++++++++++++++++++++++++++---
drivers/isimodem/sms.c | 958 +++++++++++--
drivers/isimodem/sms.h | 41 +-
drivers/isimodem/ss.h | 22 +
drivers/isimodem/ssn.c | 406 ++++++-
drivers/isimodem/uicc.h | 265 ++++
drivers/isimodem/ussd.c | 36 +-
drivers/isimodem/voicecall.c | 218 +++-
gisi/message.c | 8 +
gisi/message.h | 1 +
gisi/modem.c | 42 +
gisi/modem.h | 4 +
gisi/pep.c | 330 +++++
gisi/pep.h | 6 +
gisi/pipe.c | 180 +++-
gisi/pipe.h | 17 +
plugins/ofono.rules | 3 +
plugins/u8500.c | 708 ++++++++++
plugins/udev.c | 2 +
src/simutil.h | 1 +
30 files changed, 8192 insertions(+), 509 deletions(-)
create mode 100644 drivers/isimodem/uicc.h
create mode 100644 plugins/u8500.c
--
1.7.3.5
11 years, 3 months
[RFCv3] doc: Proposal for LTE/IMS API
by Sjur Brændeland
From: Sjur Brændeland <sjur.brandeland(a)stericsson.com>
With latest changes the P-CSCF addresses from ISIM can be read
from the IpMultimediaIdentity objects and the P-CSCF addresses
returned as dynamic parameters for the PDN Connection are avilable
in the ConnectionContext object.
I have also added LocalAddress to the IMS QoS SIP PreCondiction check.
The Local IP address identifies the APN, so that PreCondition check
in effect can be done per IMS APN.
Changes from RFC-v2:
- Moved P-CSCF addresses to the IpMultimediaIdentity object
- Fixed object path descriptions
- IMS Registration types is now an array of strings
- Fixed bad parameters to UnRegister
- Added LocalAddress to PreConditionCheck
- Added P-CSCF addresses to the ConnectionContext object
---
doc/connman-api.txt | 18 ++++++
doc/ims-api.txt | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 166 insertions(+), 0 deletions(-)
create mode 100644 doc/ims-api.txt
diff --git a/doc/connman-api.txt b/doc/connman-api.txt
index 22c59dc..314c018 100644
--- a/doc/connman-api.txt
+++ b/doc/connman-api.txt
@@ -249,3 +249,21 @@ Properties boolean Active [readwrite]
string MessageCenter [readwrite, MMS only]
Holds the MMSC setting.
+
+ array{string} PcscfAddresses [readonly,optional]
+
+ For ConnectionContext with Type = "ims" this
+ property holds the Domain Names or IP Addresses
+ of the SIP Proxy, called "Proxy Call Session Control
+ Function" (P-CSCF).
+
+ The P-CSCF addresses are returned in EPS signaling as
+ part of the Default Bearer setup for the IMS APN. The
+ addresses may be of type IPv4 and/or IPv6.
+
+ Related AT command: AT+CGCONTRDP
+
+ NOTE: The P-CSCF addresses read from ISIM, is
+ available in the IpMultimediaIdentity
+ object. It is up to the IMS application to
+ choose the P-CSCF to use.
diff --git a/doc/ims-api.txt b/doc/ims-api.txt
new file mode 100644
index 0000000..9030457
--- /dev/null
+++ b/doc/ims-api.txt
@@ -0,0 +1,148 @@
+Ip Multimedia Subsystem hierarchy [experimental]
+=================================
+
+Service org.ofono
+Interface org.ofono.IpMultimediaSubsystem
+Object path [variable prefix]/{modem0,modem1,...}
+
+Methods dict GetProperties()
+
+ Returns all IMS properties. See the
+ properties section for available properties.
+
+ void Register(array{string} types)
+
+ Registers an IMS Application. It must register
+ with at least one of the types: "voice" or "messaging".
+ In future "video" (Conversational Video, Live
+ Streaming) should be added. This registration will
+ inform the modem's radio stack that the IMS application
+ has registered for Voice and/or Messaging over IMS.
+ This registration may impact "UE Mode of operation"
+ and the ISR feature in the radio stack.
+
+ The registered application is tracked, if the
+ application exits the registration will be
+ automatically released.
+
+ Possible Errors: [service].Error.InvalidArguments
+
+ void UnRegister()
+
+ Un-registers a previously registered IMS application.
+
+ boolean PreConditionCheck(string Type, string PeerAddress,
+ uint16 PeerPort, string LocalAddress,
+ uint16 LocalPort)
+
+ This method is used by the IMS application to check
+ if the QoS SIP precondition is fulfilled.
+
+ The IMS application should call this method when
+ receiving a PreConditionChanged() signal.
+ The IMS Application is not allowed to start alerting
+ before it has confirmed that it has a voice-ready
+ Dedicated Bearer and QoS set up in the network.
+
+ The legal parameter for Type currently is currently
+ "voice" only. In future "video" (Conversational Video,
+ Live Streaming) will be added.
+
+ PeerAddress and LocalAddress can be IPv4 or IPv6
+ address. PeerPort and LocalPort is the RTP port
+ used for the media stream.
+
+ This method returns true if the Traffic Flow Template
+ read from the modem matches the address information
+ provided, and the QCI and Bit Rates fulfills the
+ requirements for the specified Type.
+
+ Related AT commands: AT+CGEQOSRDP, AT+CGTFTRDP
+
+Signals PropertyChanged(string property, variant value)
+
+ This signal indicates a changed value of the given
+ property.
+
+ void PreConditionChanged()
+
+ This signal is sent when the network has changed
+ the QoS or Packet Filters for a Bearer.
+ The IMS application can then check the QoS SIP
+ preconditions by calling PreConditionCheck().
+
+ Only QoS information relevant for IMS will be
+ signaled, i.e. QCI=1 for voice and QCI=2 for video.
+
+ Related AT commands: AT+CGEREP,
+ +CGEV: NW ACT, +CGEV: NW MODIFY
+
+Properties
+ array{object} Identities [readonly]
+
+ Array of IP Multimedia Services Identity Module
+ (ISIM) objects.
+
+ boolean VoiceOverPs [readonly]
+
+ IMS voice is enabled by network
+ Related AT command: AT+CIREP.
+
+ string CsHandoverProgress [readonly, optional]
+
+ Indicates the handover progress status during a CS
+ fallback procedure. The possible values are:
+ "started" - CS Fallback procedure has started
+ "complete" - CS Fallback procedure has completed
+ "failure" - CS Fallback has failed
+ "idle" - No CS call or fallback is ongoing
+
+ Related AT URC: +CIREP
+
+IP Multimedia Identity hierarchy [experimental]
+================================
+Service org.ofono
+Interface org.ofono.IpMultimediaIdentity
+Object path [variable prefix]/{modem0,modem1,...}/{isim0, isim1, ...}
+
+Methods dict GetProperties()
+
+ Returns ISIM properties relevant for IMS.
+
+ Possible Errors: [service].Error.InvalidArguments
+
+ NOTE: No PropertyChanged signal is provided.
+ Technically it is possible for provisioning
+ to update these identities, but 3gpp TS31.103
+ discourages this.
+
+Properties string PrivateIdentity [readonly]
+
+ The Private Identity is used to allow the UE access
+ to the IMS network (registration, authorization,
+ administration and billing).
+
+ array{string} PublicIdentity [readonly]
+
+ The Public Identity is used to identify a specific
+ IMS user (there may be more than one associated
+ with one Private Identity). This information is conveyed
+ to the IMS Network during registration so that the
+ network can know what IMS users that are registered and
+ available for service (e.g. a reception of a voice
+ session).
+
+ string HomeDomainName[readonly]
+
+ Identity used for IMS registration.
+
+ array{string} PcscfAddresses [readonly]
+
+ Domain Names or IP Addresses of the SIP Proxy,
+ called "Proxy Call Session Control Function" (P-CSCF).
+ The P-CSCF addresses is read from the EFp-cscf SIM
+ record. The addresses may be of type IPv4 and/or IPv6.
+
+ NOTE: P-CSCF addresses are also provided in the
+ ConnectionContext API. It is up to the IMS
+ application to choose the P-CSCF to use.
--
1.7.0.4
11 years, 3 months
[PATCH] stk: Handle Refresh if also performed by modem.
by Andrzej Zaborowski
---
src/stk.c | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index bc46b2f..c35f457 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1981,6 +1981,7 @@ static void free_idle_mode_text(struct ofono_stk *stk)
memset(&stk->idle_mode_icon, 0, sizeof(stk->idle_mode_icon));
}
+/* Note: may be called from ofono_stk_proactive_command_handled_notify */
static gboolean handle_command_refresh(const struct stk_command *cmd,
struct stk_response *rsp,
struct ofono_stk *stk)
@@ -2025,7 +2026,8 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
default:
ofono_info("Undefined Refresh qualifier: %d", cmd->qualifier);
- rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
+ if (rsp != NULL)
+ rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
return TRUE;
}
@@ -2048,11 +2050,18 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
sim = __ofono_atom_get_data(sim_atom);
if (sim == NULL) {
- rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
+ if (rsp != NULL)
+ rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
return TRUE;
}
- if (cmd->qualifier < 4) {
+ /*
+ * For now we can handle the Refresh types that don't require
+ * a SIM reset except if that part of the task has been already
+ * handled by modem firmware (indicated by rsp == NULL) in which
+ * case we just restart our SIM initialisation.
+ */
+ if (cmd->qualifier < 4 || rsp == NULL) {
int qualifier = stk->pending_cmd->qualifier;
GSList *file_list = stk->pending_cmd->refresh.file_list;
@@ -2062,10 +2071,15 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
/*
* Queue the TERMINAL RESPONSE before triggering potential
* file accesses.
+ *
+ * TODO: Find out if we need to send the "Refresh performed
+ * with additional EFs read" response.
*/
- err = stk_respond(stk, rsp, stk_command_cb);
- if (err)
- stk_command_cb(&failure, stk);
+ if (rsp != NULL) {
+ err = stk_respond(stk, rsp, stk_command_cb);
+ if (err)
+ stk_command_cb(&failure, stk);
+ }
/* TODO: use the alphaId / icon */
/* TODO: if AID is supplied, check its value */
@@ -2084,6 +2098,9 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
break;
case 2:
case 3:
+ case 4:
+ case 5:
+ case 6:
free_idle_mode_text(stk);
__ofono_sim_refresh(sim, file_list, FALSE, TRUE);
break;
@@ -2779,6 +2796,10 @@ void ofono_stk_proactive_command_handled_notify(struct ofono_stk *stk,
&cmd->send_dtmf.text_attr,
&cmd->send_dtmf.icon_id);
break;
+
+ case STK_COMMAND_TYPE_REFRESH:
+ handle_command_refresh(stk->pending_cmd, NULL, stk);
+ break;
}
stk_command_free(cmd);
--
1.7.1.86.g0e460.dirty
11 years, 3 months
[PATCH] atmodem: Add MBM/STE quirk for SIM record update
by Miia Leinonen
Fixed the <data> string to be set inside quotes for STE/MBM.
---
Hi,
This fix has been tested with STE modem only due the lack of MBM HW.
Would it be possible that someone checks this with MBM modem? The problem is
likely to appear also there - therefore OFONO_VENDOR_MBM used. Could fix this
also to cover all modems, but that might cause some backward compatibility
issues.
BR,
Miia
drivers/atmodem/sim.c | 59 ++++++++++++++++++++++++++++++++++++++----------
1 files changed, 46 insertions(+), 13 deletions(-)
diff --git a/drivers/atmodem/sim.c b/drivers/atmodem/sim.c
index d9c0d8d..7a0100a 100644
--- a/drivers/atmodem/sim.c
+++ b/drivers/atmodem/sim.c
@@ -332,17 +332,34 @@ static void at_sim_update_record(struct ofono_sim *sim, int fileid,
{
struct sim_data *sd = ofono_sim_get_data(sim);
struct cb_data *cbd = cb_data_new(cb, data);
- char *buf = g_try_new(char, 36 + length * 2);
+ char *buf;
int len, ret;
- if (buf == NULL)
- goto error;
+ if (sd->vendor == OFONO_VENDOR_MBM) {
+ buf = g_try_new(char, 36 + 2 + length * 2);
- len = sprintf(buf, "AT+CRSM=220,%i,%i,4,%i,", fileid,
- record, length);
+ if (buf == NULL)
+ goto error;
- for (; length; length--)
- len += sprintf(buf + len, "%02hhX", *value++);
+ len = sprintf(buf, "AT+CRSM=220,%i,%i,4,%i,\"", fileid,
+ record, length);
+
+ for (; length; length--)
+ len += sprintf(buf + len, "%02hhX", *value++);
+
+ sprintf(buf + len, "\"");
+ } else {
+ buf = g_try_new(char, 36 + length * 2);
+
+ if (buf == NULL)
+ goto error;
+
+ len = sprintf(buf, "AT+CRSM=220,%i,%i,4,%i,", fileid,
+ record, length);
+
+ for (; length; length--)
+ len += sprintf(buf + len, "%02hhX", *value++);
+ }
ret = g_at_chat_send(sd->chat, buf, crsm_prefix,
at_crsm_update_cb, cbd, g_free);
@@ -364,16 +381,32 @@ static void at_sim_update_cyclic(struct ofono_sim *sim, int fileid,
{
struct sim_data *sd = ofono_sim_get_data(sim);
struct cb_data *cbd = cb_data_new(cb, data);
- char *buf = g_try_new(char, 36 + length * 2);
+ char *buf;
int len, ret;
- if (buf == NULL)
- goto error;
+ if (sd->vendor == OFONO_VENDOR_MBM) {
+ buf = g_try_new(char, 36 + 2 + length * 2);
- len = sprintf(buf, "AT+CRSM=220,%i,0,3,%i,", fileid, length);
+ if (buf == NULL)
+ goto error;
- for (; length; length--)
- len += sprintf(buf + len, "%02hhX", *value++);
+ len = sprintf(buf, "AT+CRSM=220,%i,0,3,%i,\"", fileid, length);
+
+ for (; length; length--)
+ len += sprintf(buf + len, "%02hhX", *value++);
+
+ sprintf(buf + len, "\"");
+ } else {
+ buf = g_try_new(char, 36 + length * 2);
+
+ if (buf == NULL)
+ goto error;
+
+ len = sprintf(buf, "AT+CRSM=220,%i,0,3,%i,", fileid, length);
+
+ for (; length; length--)
+ len += sprintf(buf + len, "%02hhX", *value++);
+ }
ret = g_at_chat_send(sd->chat, buf, crsm_prefix,
at_crsm_update_cb, cbd, g_free);
--
1.7.1
11 years, 3 months
ofono crash (setting offline while connected)
by Amit Mendapara
Hi,
While testing the Linktop driver I observed that ofono is crashing if I try
to set modem offline while it is connected (using test/offline-modem.py
script). After some debugging, I found that `linktop_disconnect` function is
being called twice (see the attached debug log).
What could be the reason here? I have seen some hack in mbm driver (in
mbm_disconnect) having `reopen_callback`. I have tried this but then having
another crash (this time when creating gprs context). Anyone, please clarify
how to deal with the issue properly?
Regards
--
Amit Mendapara
11 years, 3 months
[PATCH 1/1] isimodem: group timeouts in enum, remove unused timeout
by George Matveev
Introduce enum network_timeout for scan/registration timeouts,
remove unused NETWORK_TIMEOUT.
---
drivers/isimodem/network.h | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/isimodem/network.h b/drivers/isimodem/network.h
index b96216d..f35ed5a 100644
--- a/drivers/isimodem/network.h
+++ b/drivers/isimodem/network.h
@@ -27,11 +27,13 @@ extern "C" {
#endif
#define PN_NETWORK 0x0A
-#define NETWORK_TIMEOUT 5
-#define NETWORK_SCAN_TIMEOUT 180
-#define NETWORK_SET_TIMEOUT 240
#define NET_INVALID_TIME 0x64
+enum network_timeout {
+ NETWORK_SCAN_TIMEOUT = 180,
+ NETWORK_SET_TIMEOUT = 240
+};
+
enum net_message_id {
NET_SET_REQ = 0x07,
NET_SET_RESP = 0x08,
--
1.7.2.3
11 years, 3 months
[PATCH] stk: Make sure to reset respond_on_exit.
by Andrzej Zaborowski
This fixes a crash spotted by Lasse Kunnasluoto documented at
http://lists.ofono.org/pipermail/ofono/2011-February/009211.html
---
src/stk.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index bc46b2f..c4e988b 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -2514,6 +2514,7 @@ static void stk_proactive_command_cancel(struct ofono_stk *stk)
stk_command_free(stk->pending_cmd);
stk->pending_cmd = NULL;
stk->cancel_cmd = NULL;
+ stk->respond_on_exit = FALSE;
}
}
--
1.7.1.86.g0e460.dirty
11 years, 4 months
[PATCH] stk: Add null pointer check
by Lasse Kunnasluoto
Fixes a crash when SIM Session End is received while waiting for user response to SELECT ITEM command.
---
src/stk.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index bc46b2f..cda378f 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -115,6 +115,9 @@ static int stk_respond(struct ofono_stk *stk, struct stk_response *rsp,
if (stk->driver->terminal_response == NULL)
return -ENOSYS;
+ if (stk->pending_cmd == NULL)
+ return -EINVAL;
+
rsp->src = STK_DEVICE_IDENTITY_TYPE_TERMINAL;
rsp->dst = STK_DEVICE_IDENTITY_TYPE_UICC;
rsp->number = stk->pending_cmd->number;
--
1.7.0.4
11 years, 4 months