aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Tommy Humborstad <kim.tommy.humborstad@stericsson.com>2011-05-26 17:24:07 +0200
committerSverre Vegge <sverre.vegge@stericsson.com>2011-08-03 10:41:26 +0200
commitbcae74704a979c719925984e376801abf8b9a90b (patch)
tree7a3ff60c9931b923e481fc12288d90c601a1e36f
parentb44f19ec5496553d72a12fbfe85b3abd8e27dfdb (diff)
downloadu300-bcae74704a979c719925984e376801abf8b9a90b.tar.gz
Audio: Resetting audio static variable s_voiceCallStart at modem restart
Signed-off-by: Sverre Vegge <sverre.vegge@stericsson.com>
-rw-r--r--u300-ril-audio.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/u300-ril-audio.c b/u300-ril-audio.c
index 1af51a6..6b23eb0 100644
--- a/u300-ril-audio.c
+++ b/u300-ril-audio.c
@@ -22,6 +22,7 @@
*/
#include <string.h>
#include <assert.h>
+#include <stdbool.h>
#include <telephony/ril.h>
#include "atchannel.h"
#include "at_tok.h"
@@ -40,16 +41,19 @@
*/
#define __s_ttyMode 0
static int s_ttyMode = __s_ttyMode;
+
+#ifdef ENABLE_REPORTING_ALERTING_UPON_MISSING_CALL_STATE_FROM_NETWORK
+#define __s_voiceCallStart false
+static volatile bool s_voiceCallStart = __s_voiceCallStart;
+#endif
/*****************************************************/
/* Controlled static state variables - section end */
/*****************************************************/
#ifdef ENABLE_REPORTING_ALERTING_UPON_MISSING_CALL_STATE_FROM_NETWORK
-#include <stdbool.h>
-static volatile bool g_voice_call_start = false;
bool getVoiceCallStartState()
{
- return g_voice_call_start;
+ return s_voiceCallStart;
}
#endif
@@ -125,14 +129,14 @@ void onAudioCallEventNotify(const char *s)
*/
if (res == 3) {
#ifdef ENABLE_REPORTING_ALERTING_UPON_MISSING_CALL_STATE_FROM_NETWORK
- g_voice_call_start = true;
+ s_voiceCallStart = true;
#endif
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED,
NULL, 0);
goto exit;
} else if (res == 2) {
#ifdef ENABLE_REPORTING_ALERTING_UPON_MISSING_CALL_STATE_FROM_NETWORK
- g_voice_call_start = false;
+ s_voiceCallStart = false;
#endif
goto exit;
}
@@ -166,6 +170,11 @@ void onResetModemStateAudio(int resetState)
*/
/** s_ttyMode */
/* Survive reset */
+
+#ifdef ENABLE_REPORTING_ALERTING_UPON_MISSING_CALL_STATE_FROM_NETWORK
+ /** s_voiceCallStart */
+ s_voiceCallStart = __s_voiceCallStart;
+#endif
break;
case RESET_AT_INITIALIZED:
/*