[PATCH] emulator: fix notify_ring
by Frédéric Danis
notify_ring should not use information from waiting call
---
src/emulator.c | 7 -------
1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/src/emulator.c b/src/emulator.c
index 262e782..0f1ceca 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -421,13 +421,6 @@ static gboolean notify_ring(void *user_data)
c = find_call_with_status(em, CALL_STATUS_INCOMING);
- /*
- * In case of waiting call becoming an incoming call, call status
- * change may not have been done yet, so try to find waiting call too
- */
- if (c == NULL)
- c = find_call_with_status(em, CALL_STATUS_WAITING);
-
if (c == NULL)
return TRUE;
--
1.7.1
8 years, 10 months
[PATCH] voicecall: Don't set indicators during transitions
by Denis Kenzior
---
src/voicecall.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/voicecall.c b/src/voicecall.c
index e224d3a..c128227 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -825,6 +825,19 @@ static void notify_emulator_call_status(struct ofono_voicecall *vc)
}
}
+ /*
+ * Perform some basic sanity checks for transitionary states;
+ * if a transitionary state is detected, then ignore it. The call
+ * indicators will be updated properly in the follow-on calls to
+ * this function once the final state has been reached
+ */
+
+ if (incoming && (held || call))
+ return;
+
+ if (waiting && (held == FALSE && call == FALSE))
+ return;
+
data.status = call || held ? OFONO_EMULATOR_CALL_ACTIVE :
OFONO_EMULATOR_CALL_INACTIVE;
--
1.7.3.4
8 years, 10 months
[PATCH] emulator: Fix PTS test case TC_AG_TWC_BV_02_I
by Denis Kenzior
---
src/emulator.c | 48 +++++++++++++++++++++++++++++-------------------
1 files changed, 29 insertions(+), 19 deletions(-)
diff --git a/src/emulator.c b/src/emulator.c
index 262e782..5f460c2 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -36,6 +36,8 @@
#define RING_TIMEOUT 3
+#define EMULATOR_FLAG_WAITING_TRANSITION 1
+
struct ofono_emulator {
struct ofono_atom *atom;
enum ofono_emulator_type type;
@@ -52,6 +54,7 @@ struct ofono_emulator {
gboolean clip;
gboolean ccwa;
int pns_id;
+ int flags;
};
struct indicator {
@@ -420,14 +423,6 @@ static gboolean notify_ring(void *user_data)
return TRUE;
c = find_call_with_status(em, CALL_STATUS_INCOMING);
-
- /*
- * In case of waiting call becoming an incoming call, call status
- * change may not have been done yet, so try to find waiting call too
- */
- if (c == NULL)
- c = find_call_with_status(em, CALL_STATUS_WAITING);
-
if (c == NULL)
return TRUE;
@@ -1186,19 +1181,29 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
gboolean callsetup;
gboolean waiting;
+ ofono_debug("name: %s, value: %d", name, value);
+
ind = find_indicator(em, name, &i);
- if (ind == NULL || ind->value == value || value < ind->min
- || value > ind->max)
+ if (ind == NULL || value < ind->min || value > ind->max)
+ return;
+
+ cs_ind = find_indicator(em, OFONO_EMULATOR_IND_CALLSETUP, NULL);
+ callsetup = ind == cs_ind;
+
+ if (em->flags & EMULATOR_FLAG_WAITING_TRANSITION) {
+ if (ind->value == value && callsetup)
+ goto callsetup;
+ }
+
+ if (ind->value == value)
return;
ind->value = value;
call_ind = find_indicator(em, OFONO_EMULATOR_IND_CALL, NULL);
- cs_ind = find_indicator(em, OFONO_EMULATOR_IND_CALLSETUP, NULL);
call = ind == call_ind;
- callsetup = ind == cs_ind;
/*
* When callsetup indicator goes to Incoming and there is an active
@@ -1218,6 +1223,16 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
ind->deferred = TRUE;
}
+callsetup:
+ /*
+ * In case of waiting call becoming an incoming call, call status
+ * change may not have been done yet, so do nothing
+ */
+ if (find_call_with_status(em, CALL_STATUS_WAITING) != NULL) {
+ em->flags |= EMULATOR_FLAG_WAITING_TRANSITION;
+ return;
+ }
+
/*
* Ring timer should be started when:
* - callsetup indicator is set to Incoming and there is no active call
@@ -1227,17 +1242,12 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
* In those cases, a first RING should be sent just after the +CIEV
* Ring timer should be stopped for all other values of callsetup
*/
- if (waiting)
- return;
-
- /* Call state went from active/held + waiting -> incoming */
- if (call && value == OFONO_EMULATOR_CALL_INACTIVE &&
- cs_ind->value == OFONO_EMULATOR_CALLSETUP_INCOMING)
- goto start_ring;
if (!callsetup)
return;
+ em->flags &= ~EMULATOR_FLAG_WAITING_TRANSITION;
+
if (value != OFONO_EMULATOR_CALLSETUP_INCOMING) {
if (em->callsetup_source > 0) {
g_source_remove(em->callsetup_source);
--
1.7.3.4
8 years, 10 months
[PATCH] emulator: Fix for PTS test TC_AG_TWC_BV_02_I
by Frédéric Danis
RING event should only be sent when callsetup indicator is set to
Incoming and there is no active call.
If call indicator is set to inactive while callsetup is
already set to Incoming (waiting call has generated +CCWA),
RING event should be sent after all calls' state have been updated.
As state of calls are updated one by one, generating multiple calls
to ofono_emulator_set_indicator(), do not call notify_ring() just
after call indicator went from active/held to inactive (only start
ring timer).
In ring_timer(), in case of a call in waiting state, just exit and
wait for next timeout.
---
src/emulator.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/emulator.c b/src/emulator.c
index 262e782..fed699c 100644
--- a/src/emulator.c
+++ b/src/emulator.c
@@ -414,6 +414,13 @@ static gboolean notify_ring(void *user_data)
if (em->type == OFONO_EMULATOR_TYPE_HFP && em->slc == FALSE)
return TRUE;
+ /*
+ * In case of waiting call becoming an incoming call, call status
+ * change may not have been done yet, wait for change has been completed
+ */
+ if (find_call_with_status(em, CALL_STATUS_WAITING))
+ return TRUE;
+
g_at_server_send_unsolicited(em->server, "RING");
if (!em->clip)
@@ -421,13 +428,6 @@ static gboolean notify_ring(void *user_data)
c = find_call_with_status(em, CALL_STATUS_INCOMING);
- /*
- * In case of waiting call becoming an incoming call, call status
- * change may not have been done yet, so try to find waiting call too
- */
- if (c == NULL)
- c = find_call_with_status(em, CALL_STATUS_WAITING);
-
if (c == NULL)
return TRUE;
@@ -1221,10 +1221,10 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
/*
* Ring timer should be started when:
* - callsetup indicator is set to Incoming and there is no active call
- * (not a waiting call)
+ * (not a waiting call), in this case, a first RING should be sent
+ * just after the +CIEV
* - or call indicator is set to inactive while callsetup is already
* set to Incoming.
- * In those cases, a first RING should be sent just after the +CIEV
* Ring timer should be stopped for all other values of callsetup
*/
if (waiting)
@@ -1247,8 +1247,9 @@ void ofono_emulator_set_indicator(struct ofono_emulator *em,
return;
}
-start_ring:
notify_ring(em);
+
+start_ring:
em->callsetup_source = g_timeout_add_seconds(RING_TIMEOUT,
notify_ring, em);
}
--
1.7.1
8 years, 10 months
Re: [Gta04-owner] Polling CLCC error handling on Option modem (GTA04)
by Radek Polak
On Tuesday 06 March 2012 20:17:32 Dr. H. Nikolaus Schaller wrote:
> @Radek: is it possible to manually contact the AT interface in this state
> and try if it is still operational and another AT+CLCC would succeed?
It seems after few errors it starts working again - if i understand it right
(see log below). Btw the probability of +CME ERROR increases with smaller CLCC
interval.
So ingoring the error and trying again is the way to go for us?
Regards
Radek
AtChat : F : "+CLCC: 1,1,4,0,0,"+420608828973",145"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "+CLCC: 1,1,4,0,0,"+420608828973",145"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "+CLCC: 1,1,4,0,0,"+420608828973",145"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "+CLCC: 1,1,4,0,0,"+420608828973",145"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "+CME ERROR: 100"
AtChat : T : "AT+CLCC"
AtChat : F : "+CME ERROR: 100"
AtChat : T : "AT+CLCC"
AtChat : F : "+CME ERROR: 100"
AtChat : T : "AT+CLCC"
AtChat : F : "+CME ERROR: 100"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
AtChat : T : "AT+CLCC"
AtChat : F : "OK"
8 years, 10 months
[PATCH 0/2] phonesim: Add timer to set the variable with the delay
by Oleg Zhurakivskyy
Hello,
Please find the changes in order to permit to set variables
with the delay (specify the delay in milliseconds):
<chat>
<set name="AAA" value="BBB" delay="30000"/>
</chat>
This might be useful to simulate SIM PIN unlocking cases, etc.
Regards,
Oleg
Oleg Zhurakivskyy (2):
phonesim: Minor reflow in SimChat::command()
phonesim: Add timer to set the variable with the delay
src/phonesim.cpp | 49 ++++++++++++++++++++++++++++++++++++++-----------
src/phonesim.h | 14 ++++++++++++++
2 files changed, 52 insertions(+), 11 deletions(-)
--
1.7.5.4
8 years, 10 months
[PATCH] phonesim: Fix call scripting capability
by Frédéric Danis
---
doc/scriptable.txt | 6 +++---
src/control.cpp | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/doc/scriptable.txt b/doc/scriptable.txt
index 670bd21..95ae1e1 100644
--- a/doc/scriptable.txt
+++ b/doc/scriptable.txt
@@ -7,8 +7,8 @@ call, you have to do some operations manually within phonesim GUI). Below are
several examples:
1. call.js (stand for incoming call and copy it to /tmp/call/)
-tabRegistration.gbIncomingCall.leCaller.text = "12345";
-tabRegistration.gbIncomingCall.pbIncomingCall.click();
+tabCall.gbIncomingCall.leCaller.text = "12345";
+tabCall.gbIncomingCall.pbIncomingCall.click();
Then set the path of script and run the script with its name:
@@ -50,6 +50,6 @@ Reference" for details.
For example, if you want to know the current incoming number, you may write a
script as below:
// number.js
-tabRegistration.gbIncomingCall.leCaller.text
+tabCall.gbIncomingCall.leCaller.text
After running the script the similar way as above, you may get the number.
diff --git a/src/control.cpp b/src/control.cpp
index 2666b4c..ee1e7d8 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -667,6 +667,9 @@ Script::Script(QObject *obj, Ui_ControlBase *ui) : QDBusAbstractAdaptor(obj)
QScriptValue qsTab8 = engine.newQObject(ui->tab_8);
engine.globalObject().setProperty("tabPosition", qsTab8);
+
+ QScriptValue qsTab9 = engine.newQObject(ui->tab_9);
+ engine.globalObject().setProperty("tabCall", qsTab9);
}
void Script::SetPath(const QString &path, const QDBusMessage &msg)
--
1.7.1
8 years, 11 months