Hello Denis, Le 02/06/2011 04:08, Denis Kenzior a écrit : >> +static void emulator_dial(struct ofono_emulator *em, struct ofono_voicecall *vc, >> + const char *number) >> +{ >> + struct ofono_error result; >> + int err; >> + >> + result.error = 0; >> + >> + if (vc->pending_em) { >> + result.type = OFONO_ERROR_TYPE_FAILURE; >> + goto send; >> + } > > You might also want to check that the Dial is not happening via D-Bus or > STK, and vice-versa. Voicecall_dial will check if there is already a pending outgoing call. I think this is sufficient to manage concurrent ATD between D-Bus, STK and emulator. > >> + >> + vc->pending_em = em; >> + >> + err = voicecall_dial(vc, number, OFONO_CLIR_OPTION_DEFAULT, >> + emulator_dial_callback, vc); >> + >> + if (err>= 0) >> + return; >> + >> + vc->pending_em = NULL; >> + >> + switch (err) { >> + case -ENETDOWN: >> + result.error = 30; >> + result.type = OFONO_ERROR_TYPE_CME; >> + break; >> + >> + default: >> + result.type = OFONO_ERROR_TYPE_FAILURE; >> + } >> + >> +send: >> + ofono_emulator_send_final(em,&result); >> +} >> + Regards Fred -- Frederic Danis Open Source Technology Centre frederic.danis(a)intel.com Intel Corporation