diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-04-11 18:14:12 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-04-11 18:14:12 +0200 |
commit | 4e16e48b24e5d67522c66af369caab0f09ea6377 (patch) | |
tree | 7b2671fafb86030487879bcb0a3f8c3592dbfca3 /gatchat/test-server.c | |
parent | 0cafc1646c6d7af52791e8a818702297266d2aad (diff) | |
download | ofono-4e16e48b24e5d67522c66af369caab0f09ea6377.tar.gz |
Make CPIN handling of AT server a bit more compliant
Diffstat (limited to 'gatchat/test-server.c')
-rw-r--r-- | gatchat/test-server.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gatchat/test-server.c b/gatchat/test-server.c index 16f3e238..4163d7be 100644 --- a/gatchat/test-server.c +++ b/gatchat/test-server.c @@ -210,11 +210,17 @@ static void cpin_cb(GAtServerRequestType type, GAtResult *cmd, gpointer user) { GAtServer *server = user; + if (modem_mode == 0) { + g_at_server_send_final(server, G_AT_SERVER_RESULT_ERROR); + return; + } + switch (type) { case G_AT_SERVER_REQUEST_TYPE_SET: - g_at_server_send_final(server, G_AT_SERVER_RESULT_OK); + g_at_server_send_final(server, G_AT_SERVER_RESULT_ERROR); break; case G_AT_SERVER_REQUEST_TYPE_SUPPORT: + g_at_server_send_info(server, "+CPIN: (READY)", TRUE); g_at_server_send_final(server, G_AT_SERVER_RESULT_OK); break; case G_AT_SERVER_REQUEST_TYPE_QUERY: |