Hi Frédéric,
+static void emulator_vts_cb(struct ofono_emulator *em,
+ struct ofono_emulator_request *req, void *userdata)
+{
+ struct ofono_voicecall *vc = userdata;
+ struct ofono_error result;
+ const char *str;
+
+ switch (ofono_emulator_request_get_type(req)) {
+ case OFONO_EMULATOR_REQUEST_TYPE_SET:
+ str = ofono_emulator_request_get_raw(req);
+
+ if (__ofono_voicecall_tone_send(vc, str, vts_tone_cb, em) < 0)
+ break;
This looks wrong. The VTS command takes a single ascii character, not a
string. So you need to validate that. +VTS also does not accept P/p
characters, so you need to make sure to filter these out as well.
+
+ return;
+
+ default:
+ break;
+ }
+
I'd do this like this:
if (__tone_send() == 0)
return;
+ result.error = 0;
+ result.type = OFONO_ERROR_TYPE_FAILURE;
+
+ ofono_emulator_send_final(em, &result);
+}
+
Regards,
-Denis