diff options
author | Denis Kenzior <denkenz@gmail.com> | 2011-08-11 04:19:22 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-08-11 04:20:45 -0500 |
commit | db5ea99c8d7b38b2e3a4915e808587f26e90298a (patch) | |
tree | 56991eaa6f0d2a0166a27718aad930fddebe7d5a | |
parent | 9c5a385ac5a976a0f62839c5e40b5199c1fb8083 (diff) | |
download | phonesim-db5ea99c8d7b38b2e3a4915e808587f26e90298a.tar.gz |
simapp: properly generate OK to +CUSATE
-rw-r--r-- | src/phonesim.cpp | 2 | ||||
-rw-r--r-- | src/simapplication.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/phonesim.cpp b/src/phonesim.cpp index df03980..09d6306 100644 --- a/src/phonesim.cpp +++ b/src/phonesim.cpp @@ -982,8 +982,6 @@ bool SimRules::simCommand( const QString& cmd ) if (!toolkitApp || !toolkitApp->envelope( env ) ) respond( "ERROR" ); - respond( "OK" ); - return true; } diff --git a/src/simapplication.cpp b/src/simapplication.cpp index b928f25..e0adf6b 100644 --- a/src/simapplication.cpp +++ b/src/simapplication.cpp @@ -179,8 +179,10 @@ bool SimApplication::envelope( const QSimEnvelope& env ) { /* Process a menu selection ENVELOPE message. We turn it into a * QSimTerminalResponse to make it easier to process. */ - if ( env.type() == QSimEnvelope::EventDownload ) + if ( env.type() == QSimEnvelope::EventDownload ) { + d->rules->respond( "OK" ); return true; + } if ( env.type() != QSimEnvelope::MenuSelection ) /* Not supported */ @@ -190,6 +192,8 @@ bool SimApplication::envelope( const QSimEnvelope& env ) /* Envelope sent for the wrong type of command. */ return false; + d->rules->respond( "OK" ); + d->expectedType = QSimCommand::NoCommand; d->currentCommand = QByteArray(); d->target = 0; |