RIL: return error to requests when freeze is going on
[hayes-ril.git] / hayes-ril.c
index 50b4701..4a66fd0 100644 (file)
@@ -35,6 +35,11 @@ struct ril_dispatch_unsol ril_dispatch_unsol[] = {
 
 void ril_on_request(int request, void *data, size_t length, RIL_Token t)
 {
+       if(at_freeze_get() != AT_FREEZE_OFF) {
+               RIL_onRequestComplete(t, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0);
+               return;
+       }
+
        switch(request) {
                // Power
                case RIL_REQUEST_RADIO_POWER: