Hi Denis,
On Tue, Dec 7, 2010 at 11:21 AM, Denis Kenzior <denkenz(a)gmail.com> wrote:
> diff --git a/plugins/huawei.c b/plugins/huawei.c
> index 25dfaca..32cf70d 100644
> --- a/plugins/huawei.c
> +++ b/plugins/huawei.c
> @@ -454,7 +454,7 @@ static void huawei_disconnect(gpointer user_data)
> data->sim_state == HUAWEI_SIM_STATE_INVALID_CS) {
> ofono_info("Reopened GPRS context channel");
>
> - data->gc = ofono_gprs_context_create(modem, 0,
"atmodem",
> + data->gc = ofono_gprs_context_create(modem,
OFONO_VENDOR_HUAWEI,
> "atmodem",
>
data->modem);
There's no need to pass the vendor flag here. The atmodem gprs_context
driver does not have any vendor handling code inside it.
But it seems to me the gprs context will be pass to modem plugins, so we
need to set the vendor code for Huawei modems, because it sends unquoted
strings.
For example, please correct me if wrong, when the network registration
status changed, ofono will invoke modem's set_attached() to handle the modem
attach/detach. Then, in gprs_attach_callback() in src/gprs.c, it will
invokes modem's attached_status() to check the modem state, which has vendor
dependent code in it. Most importantly, after ofono sending AT+CGREG? to
query the solicited response, the at_cgreg_cb() requires the correct vendor
ID so that at_util_parse_reg() knows whether the lac and ci are quoted
strings or not? Did I misunderstand? Thanks.
Best Regards,
Tonny