summaryrefslogtreecommitdiffstats
path: root/src/stk.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-10-22 22:25:20 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-10-22 22:25:20 -0500
commit1cc2c6b1ce4e94cb2e0e5ba82e762939567cbe38 (patch)
tree5c3fa3dbbe9e58625b056f8c0795a44f092e377d /src/stk.c
parent75ce3c7c2360af81c8f2105266a40c499ac76d29 (diff)
downloadofono-1cc2c6b1ce4e94cb2e0e5ba82e762939567cbe38.tar.bz2
stk: Remove reference to positive EINVAL
Move it to the original call where it belongs
Diffstat (limited to 'src/stk.c')
-rw-r--r--src/stk.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/stk.c b/src/stk.c
index d42a05f5..dc33809e 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1904,9 +1904,7 @@ static void dtmf_sent_cb(int error, void *user_data)
return;
}
- if (error == EINVAL)
- send_simple_response(stk, STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD);
- else if (error)
+ if (error != 0)
send_simple_response(stk, STK_RESULT_TYPE_NOT_CAPABLE);
else
send_simple_response(stk, STK_RESULT_TYPE_SUCCESS);
@@ -1965,6 +1963,11 @@ static gboolean handle_command_send_dtmf(const struct stk_command *cmd,
return TRUE;
}
+ if (err == -EINVAL) {
+ rsp->result.type = STK_RESULT_TYPE_DATA_NOT_UNDERSTOOD;
+ return TRUE;
+ }
+
if (err < 0) {
/*
* We most likely got an out of memory error, tell SIM