<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">hello Aleksander.<br>i will post a new patch today.<br>please see my comments below<br><br><br><span style="color:rgb(80,0,80)">On Tue, Jul 2, 2013 at 1:33 AM, Aleksander Morgado </span><span dir="ltr" style="color:rgb(80,0,80)"><<a href="mailto:aleksander@lanedo.com" target="_blank">aleksander@lanedo.com</a>></span><span style="color:rgb(80,0,80)"> wrote:</span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="gmail_extra"><div class="gmail_quote"><div>
<div class="h5">
<blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>Hey Ori,<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
</blockquote><br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>See comments below.<br><br><br>On 02/07/13 07:27, ori inbar wrote:<br>> From: ori inbar <<a href="mailto:ori.inbar@altair-semi.com" target="_blank">ori.inbar@altair-semi.com</a>><br>><br>> Change-Id: I139802238868e9743390906c1cfc77fef9179599<br>
> ---<br>>  ...g.freedesktop.ModemManager1.Modem.Modem3gpp.xml |  17 +++<br>>  libmm-glib/mm-simple-status.c                      |  26 +++-<br>>  libmm-glib/mm-simple-status.h                      |   1 +<br>
>  src/mm-broadband-bearer.c                          |  10 ++<br>>  src/mm-iface-modem-3gpp.c                          | 145 +++++++++++++++++++--<br>>  src/mm-iface-modem-3gpp.h                          |  18 +++<br>
>  6 files changed, 206 insertions(+), 11 deletions(-)<br>><br>> diff --git a/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml b/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml<br>> index 83e1499..14b5e02 100644<br>
> --- a/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml<br>> +++ b/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml<br>> @@ -136,5 +136,22 @@<br>>      --><br>>      <property name="EnabledFacilityLocks" type="u" access="read" /><br>
><br>> +    <!--<br>> +        VendorPcoInfo<br>> +<br>> +        Vendor-specific protocol configuration option (PCO) info received from the LTE<br>> +        mobile network to which the mobile is currently registered (see 3GPP TS 24.008<br>
> +        Section 10.5.6.3).<br>> +<br>> +        Returned in the format <literal>"PCOIdPCOPayload"</literal>, where<br>> +        <literal>PCOId</literal> is the 4-digit hex-encoded string of PCO ID and<br>
> +        <literal>PCOPayload</literal> is the hex-encoded string of the PCO payload data,<br>> +        e.g. <literal>"FF003114800"</literal>.<br>> +<br>> +        If the <literal>PCOId</literal> and <literal>PCOPayload</literal> are not known<br>
> +        or the mobile is not registered to a mobile network, this property will<br>> +        be a zero-length (blank) string.<br>> +    --><br>> +    <property name="VendorPcoInfo" type="s" access="read" /><br>
>    </interface><br>>  </node><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
</blockquote>What is the point of adding this property in the Simple Status info?<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>Simple Status should have the most commonly used values (e.g. operator<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>name, code, signal quality...). This PCO info doesn't seem very commonly<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>used to me; so I would not add it to Simple Status.<br>
<div><div><br></div></div></div></div></div></div></div></blockquote><span style="color:rgb(80,0,80)"> </span><br>we need it since we need to print the PCO in mmcli .<br><font color="#500050"><br></font><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><br>> diff --git a/libmm-glib/mm-simple-status.c b/libmm-glib/mm-simple-status.c<br>> index 10dfee3..0560a34 100644<br>> --- a/libmm-glib/mm-simple-status.c<br>
> +++ b/libmm-glib/mm-simple-status.c<br>> @@ -44,6 +44,7 @@ enum {<br>>      PROP_3GPP_REGISTRATION_STATE,<br>>      PROP_3GPP_OPERATOR_CODE,<br>>      PROP_3GPP_OPERATOR_NAME,<br>> +    PROP_3GPP_VENDOR_PCO_INFO,<br>
>      PROP_CDMA_CDMA1X_REGISTRATION_STATE,<br>>      PROP_CDMA_EVDO_REGISTRATION_STATE,<br>>      PROP_CDMA_SID,<br>> @@ -72,6 +73,8 @@ struct _MMSimpleStatusPrivate {<br>>      gchar *modem_3gpp_operator_code;<br>
>      /* 3GPP operator name, given only when registered, signature 's' */<br>>      gchar *modem_3gpp_operator_name;<br>> +    /* 3GPP LTE vendor PCO info, given only when registered, signature 's' */<br>
> +    gchar *modem_3gpp_vendor_pco_info;<br>><br>>      /* <--- From the Modem CDMA interface ---> */<br>>      /* CDMA/CDMA1x registration state, signature 'u' */<br>> @@ -350,6 +353,11 @@ mm_simple_status_get_dictionary (MMSimpleStatus *self)<br>
>                                     "{sv}",<br>>                                     MM_SIMPLE_PROPERTY_3GPP_OPERATOR_NAME,<br>>                                     g_variant_new_string (self->priv->modem_3gpp_operator_name));<br>
> +        if (self->priv->modem_3gpp_vendor_pco_info)<br>> +            g_variant_builder_add (&builder,<br>> +                                   "{sv}",<br>> +                                   MM_SIMPLE_PROPERTY_3GPP_VENDOR_PCO_INFO,<br>
> +                                   g_variant_new_string (self->priv->modem_3gpp_vendor_pco_info));<br>><br>>          if (self->priv->modem_cdma_cdma1x_registration_state != MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN) {<br>
>              g_variant_builder_add (&builder,<br>> @@ -423,7 +431,8 @@ mm_simple_status_new_from_dictionary (GVariant *dictionary,<br>>                            key, g_variant_get_uint32 (value),<br>>                            NULL);<br>
>          } else if (g_str_equal (key, MM_SIMPLE_PROPERTY_3GPP_OPERATOR_CODE) ||<br>> -                   g_str_equal (key, MM_SIMPLE_PROPERTY_3GPP_OPERATOR_NAME)) {<br>> +                   g_str_equal (key, MM_SIMPLE_PROPERTY_3GPP_OPERATOR_NAME) ||<br>
> +                   g_str_equal (key, MM_SIMPLE_PROPERTY_3GPP_VENDOR_PCO_INFO)) {<br>>              /* string properties */<br>>              g_object_set (properties,<br>>                            key, g_variant_get_string (value, NULL),<br>
> @@ -501,6 +510,10 @@ set_property (GObject *object,<br>>          g_free (self->priv->modem_3gpp_operator_code);<br>>          self->priv->modem_3gpp_operator_code = g_value_dup_string (value);<br>>          break;<br>
> +    case PROP_3GPP_VENDOR_PCO_INFO:<br>> +        g_free (self->priv->modem_3gpp_vendor_pco_info);<br>> +        self->priv->modem_3gpp_vendor_pco_info = g_value_dup_string (value);<br>> +        break;<br>
>      case PROP_3GPP_OPERATOR_NAME:<br>>          g_free (self->priv->modem_3gpp_operator_name);<br>>          self->priv->modem_3gpp_operator_name = g_value_dup_string (value);<br>> @@ -553,6 +566,9 @@ get_property (GObject *object,<br>
>      case PROP_3GPP_OPERATOR_NAME:<br>>          g_value_set_string (value, self->priv->modem_3gpp_operator_name);<br>>          break;<br>> +    case PROP_3GPP_VENDOR_PCO_INFO:<br>> +        g_value_set_string (value, self->priv->modem_3gpp_vendor_pco_info);<br>
> +        break;<br>>      case PROP_CDMA_CDMA1X_REGISTRATION_STATE:<br>>          g_value_set_enum (value, self->priv->modem_cdma_cdma1x_registration_state);<br>>          break;<br>> @@ -678,6 +694,14 @@ mm_simple_status_class_init (MMSimpleStatusClass *klass)<br>
>                               G_PARAM_READWRITE);<br>>      g_object_class_install_property (object_class, PROP_3GPP_OPERATOR_NAME, properties[PROP_3GPP_OPERATOR_NAME]);<br>><br>> +    properties[PROP_3GPP_VENDOR_PCO_INFO] =<br>
> +        g_param_spec_string (MM_SIMPLE_PROPERTY_3GPP_VENDOR_PCO_INFO,<br>> +                             "3GPP LTE vendor PCO info",<br>> +                             "Hex-encoded string of the current vendor PCO info",<br>
> +                             NULL,<br>> +                             G_PARAM_READWRITE);<br>> +    g_object_class_install_property (object_class, PROP_3GPP_VENDOR_PCO_INFO, properties[PROP_3GPP_VENDOR_PCO_INFO]);<br>
> +<br>>      properties[PROP_CDMA_CDMA1X_REGISTRATION_STATE] =<br>>          g_param_spec_enum (MM_SIMPLE_PROPERTY_CDMA_CDMA1X_REGISTRATION_STATE,<br>>                             "CDMA1x registration state",<br>
> diff --git a/libmm-glib/mm-simple-status.h b/libmm-glib/mm-simple-status.h<br>> index 8292fdb..be4f7f6 100644<br>> --- a/libmm-glib/mm-simple-status.h<br>> +++ b/libmm-glib/mm-simple-status.h<br>> @@ -88,6 +88,7 @@ guint                        mm_simple_status_get_cdma_nid<br>
>  #define MM_SIMPLE_PROPERTY_3GPP_REGISTRATION_STATE "m3gpp-registration-state"<br>>  #define MM_SIMPLE_PROPERTY_3GPP_OPERATOR_CODE      "m3gpp-operator-code"<br>>  #define MM_SIMPLE_PROPERTY_3GPP_OPERATOR_NAME      "m3gpp-operator-name"<br>
> +#define MM_SIMPLE_PROPERTY_3GPP_VENDOR_PCO_INFO    "m3gpp-vendor-pco-info"<br>><br>>  #define MM_SIMPLE_PROPERTY_CDMA_CDMA1X_REGISTRATION_STATE "cdma-cdma1x-registration-state"<br>>  #define MM_SIMPLE_PROPERTY_CDMA_EVDO_REGISTRATION_STATE   "cdma-evdo-registration-state"<br>
> diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c<br>> index f8f449d..90fd33f 100644<br>> --- a/src/mm-broadband-bearer.c<br>> +++ b/src/mm-broadband-bearer.c<br>> @@ -1100,6 +1100,7 @@ connect_3gpp_ready (MMBroadbandBearer *self,<br>
>                      ConnectContext *ctx)<br>>  {<br>>      MMBearerConnectResult *result;<br>> +    MMBaseModem *modem = NULL;<br>>      GError *error = NULL;<br>><br>>      result = MM_BROADBAND_BEARER_GET_CLASS (self)->connect_3gpp_finish (self, res, &error);<br>
> @@ -1109,6 +1110,15 @@ connect_3gpp_ready (MMBroadbandBearer *self,<br>>          return;<br>>      }<br>><br>> +    /* Get the owner modem object */<br>> +    g_object_get (self,<br>> +                  MM_BEARER_MODEM, &modem,<br>
> +                  NULL);<br>> +    g_assert (modem != NULL);<br>> +<br>> +    /* In case of 3GPP LTE, there is a need to refresh the vendor PCO info at this stage. */<br>> +    mm_iface_modem_3gpp_reload_current_vendor_pco_info (MM_IFACE_MODEM_3GPP (modem), NULL, NULL);<br>
> +<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
</blockquote>You need to g_object_unref (modem) here, to balance out with the one you<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>got in g_object_get (). A useful hint to avoid these issues is to always<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>make sure that when MM exits and the modem is still plugged in you see<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>the "Modem (whatever)... completely disposed" log message. If you don't<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>see that message, there's a reference to balance out somewhere.<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

</blockquote><br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>But anyway, could you explain a bit why this update is needed? Why do<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>you say this is needed only in 3GPP-LTE? And if it is 3GPP-LTE only, why<br>
isn't it within a if (mm_iface_modem_is_3gpp_lte())?<br></div></div></div></div></div></blockquote><font color="#500050"><br></font>ok - i've put it under  if (mm_iface_modem_is_3gpp_lte())<br>Vendor PCO can come with any PDN (bearer) initiation - and in LTE network where there are more than one PDN<br>
you might get different Vendor PCO on each of the PDN - so when u raise the bearer here (which actually is the 3rd PDN in <br>Verizon network) you need to check the vendor PCO value in the network.<br>I'm an LTE guy - so and as far as i know only 3GPP-LTE has support for VENDOR PCO inside it's signaling.<br>
<font color="#500050"><br><br></font><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="gmail_extra">
<div class="gmail_quote">
<div class="im">
<br>>      /* take result */<br>>      connect_succeeded (ctx, CONNECTION_TYPE_3GPP, result);<br>>  }<br>> diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c<br>> index 53399d5..7fdce03 100644<br>
> --- a/src/mm-iface-modem-3gpp.c<br>> +++ b/src/mm-iface-modem-3gpp.c<br>> @@ -64,6 +64,10 @@ mm_iface_modem_3gpp_bind_simple_status (MMIfaceModem3gpp *self,<br>>                              status, MM_SIMPLE_PROPERTY_3GPP_OPERATOR_NAME,<br>
>                              G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);<br>><br>> +    g_object_bind_property (skeleton, "vendor-pco-info",<br>> +                            status, MM_SIMPLE_PROPERTY_3GPP_VENDOR_PCO_INFO,<br>
> +                            G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);<br>> +<br><br>
As said, no need this in Simple Status.<br></div></div></div></div></blockquote><span style="color:rgb(80,0,80)"> </span><br>see above <br><font color="#500050"><br></font><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><br>>      g_object_unref (skeleton);<br>>  }<br>><br>> @@ -75,7 +79,7 @@ typedef struct {<br>>      MMModem3gppRegistrationState eps;<br>
>      gboolean manual_registration;<br>>      GCancellable *pending_registration_cancellable;<br>> -    gboolean reloading_operator;<br>> +    gboolean reloading_registration_info;<br>>  } RegistrationStateContext;<br>
><br>>  static void<br>> @@ -951,6 +955,114 @@ mm_iface_modem_3gpp_clear_current_operator (MMIfaceModem3gpp *self)<br>><br>>  /*****************************************************************************/<br>
><br>> +typedef struct {<br>> +    MMIfaceModem3gpp *self;<br>> +    MmGdbusModem3gpp *skeleton;<br>> +    GSimpleAsyncResult *result;<br>> +} ReloadCurrentVendorPcoInfoContext;<br>> +<br>> +static void<br>
> +reload_current_vendor_pco_info_context_complete_and_free (ReloadCurrentVendorPcoInfoContext *ctx)<br>> +{<br>> +    g_simple_async_result_complete_in_idle (ctx->result);<br>> +    g_object_unref (ctx->result);<br>
> +    if (ctx->skeleton)<br>> +        g_object_unref (ctx->skeleton);<br>> +    g_object_unref (ctx->self);<br>> +    g_slice_free (ReloadCurrentVendorPcoInfoContext, ctx);<br>> +}<br>> +<br>> +gboolean<br>
> +mm_iface_modem_3gpp_reload_current_vendor_pco_info_finish (MMIfaceModem3gpp *self,<br>> +                                                           GAsyncResult *res,<br>> +                                                           GError **error)<br>
> +{<br>> +    return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);<br>> +}<br>> +<br>> +static void<br>> +load_vendor_pco_info_ready (MMIfaceModem3gpp *self,<br>> +                            GAsyncResult *res,<br>
> +                            ReloadCurrentVendorPcoInfoContext *ctx)<br>> +{<br>> +    GError *error = NULL;<br>> +    gchar *str;<br>> +<br>> +    str = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_vendor_pco_info_finish (self, res, &error);<br>
> +    if (error) {<br>> +        mm_warn ("Couldn't load Vendor PCO Info: '%s'", error->message);<br>> +        g_error_free (error);<br>> +    }<br>> +<br>> +    if (ctx->skeleton)<br>
> +        mm_gdbus_modem3gpp_set_vendor_pco_info (ctx->skeleton, str);<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


</blockquote>On error, the PCO info is not reseted to an empty string, it will leave<br>
the previous PCO info. Is this intended?<br></div></div></div></div></div></blockquote><font color="#500050"><br></font>i followed the same idea as load_operator_code_ready().<br><span style="color:rgb(80,0,80)"> </span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="gmail_extra"><div class="gmail_quote"><div>
<div class="h5"><br>> +<br>> +    g_free (str);<br>> +<br>> +    g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);<br>> +    reload_current_vendor_pco_info_context_complete_and_free (ctx);<br>
> +}<br>> +<br>> +void<br>> +mm_iface_modem_3gpp_reload_current_vendor_pco_info (MMIfaceModem3gpp *self,<br>> +                                                    GAsyncReadyCallback callback,<br>> +                                                    gpointer user_data)<br>
> +{<br>> +    ReloadCurrentVendorPcoInfoContext *ctx;<br>> +<br>> +    ctx = g_slice_new0 (ReloadCurrentVendorPcoInfoContext);<br>> +    ctx->self = g_object_ref (self);<br>> +    ctx->result = g_simple_async_result_new (G_OBJECT (self),<br>
> +                                             callback,<br>> +                                             user_data,<br>> +                                             mm_iface_modem_3gpp_reload_current_vendor_pco_info);<br>
> +<br>> +    g_object_get (self,<br>> +                  MM_IFACE_MODEM_3GPP_DBUS_SKELETON, &ctx->skeleton,<br>> +                  NULL);<br>> +<br>> +    if (!ctx->skeleton) {<br>> +        g_simple_async_result_set_error (ctx->result,<br>
> +                                         MM_CORE_ERROR,<br>> +                                         MM_CORE_ERROR_FAILED,<br>> +                                         "Couldn't get interface skeleton");<br>
> +        reload_current_vendor_pco_info_context_complete_and_free (ctx);<br>> +        return;<br>> +    }<br>> +<br>> +    if (!MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_vendor_pco_info ||<br>> +        !MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_vendor_pco_info_finish) {<br>
> +<br>> +        mm_gdbus_modem3gpp_set_vendor_pco_info (ctx->skeleton, NULL);<br><br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


</blockquote>Didn't you say in the interface description that if no value given, it<br>
would be an empty string? (i.e. "")<br></div></div></div></div></div></blockquote><font color="#500050"><br></font>again i followed the same as operator name which states:<br><br>If the <literal>MCC</literal> and <literal>MNC</literal> are not known<br>
<span style="color:rgb(80,0,80)">        or the mobile is not registered to a mobile network, this property will</span><br><span style="color:rgb(80,0,80)">        be a zero-length (blank) string.</span><br><font color="#500050"><br>
</font>and uses the same technique to specify it<br>mm_gdbus_modem3gpp_set_operator_code (ctx->skeleton, NULL);<br>in mm_iface_modem_3gpp_reload_current_operator<br><span style="color:rgb(80,0,80)"> </span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><br>> +<br>> +        g_simple_async_result_set_op_res_gboolean(ctx->result, TRUE);<br>> +        reload_current_vendor_pco_info_context_complete_and_free(ctx);<br>
> +        return;<br>> +    }<br>> +<br>> +    /* Launch vendor PCO info update */<br>> +    MM_IFACE_MODEM_3GPP_GET_INTERFACE (ctx->self)->load_vendor_pco_info (<br>> +        ctx->self,<br>> +        (GAsyncReadyCallback)load_vendor_pco_info_ready,<br>
> +        ctx);<br>> +}<br>> +<br>> +void<br>> +mm_iface_modem_3gpp_clear_current_vendor_pco_info (MMIfaceModem3gpp *self)<br>> +{<br>> +    MmGdbusModem3gpp *skeleton = NULL;<br>> +<br>> +    g_object_get (self,<br>
> +                  MM_IFACE_MODEM_3GPP_DBUS_SKELETON, &skeleton,<br>> +                  NULL);<br>> +    if (!skeleton)<br>> +        return;<br>> +<br>> +    mm_gdbus_modem3gpp_set_vendor_pco_info (skeleton, NULL);<br>
<br>

Same here, I was expecting an empty string "".<br></div></div></div></div></div></blockquote><font color="#500050"><br></font>see above<br><font color="#500050"><br></font><span style="color:rgb(80,0,80)"> </span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="gmail_extra"><div class="gmail_quote"><div>
<div class="h5"><br>> +}<br>> +/*****************************************************************************/<br>> +<br>> +<br>>  void<br>>  mm_iface_modem_3gpp_update_access_technologies (MMIfaceModem3gpp *self,<br>
>                                                  MMModemAccessTechnology access_tech)<br>> @@ -969,7 +1081,7 @@ mm_iface_modem_3gpp_update_access_technologies (MMIfaceModem3gpp *self,<br>>       * but only if something valid to report */<br>
>      if (state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME ||<br>>          state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING ||<br>> -        ctx->reloading_operator) {<br>> +        ctx->reloading_registration_info) {<br>
>          if (access_tech != MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN)<br>>              mm_iface_modem_update_access_technologies (MM_IFACE_MODEM (self),<br>>                                                         access_tech,<br>
> @@ -1034,7 +1146,19 @@ update_registration_reload_current_operator_ready (MMIfaceModem3gpp *self,<br>>                                             MM_MODEM_STATE_CHANGE_REASON_UNKNOWN);<br>><br>>      ctx = get_registration_state_context (self);<br>
> -    ctx->reloading_operator = FALSE;<br>> +    ctx->reloading_registration_info = FALSE;<br>> +}<br>> +<br>> +static void<br>> +update_registration_reload_current_vendor_pco_info_ready (MMIfaceModem3gpp *self,<br>
> +                                                          GAsyncResult *res,<br>> +                                                          gpointer user_data)<br>> +{<br>> +    mm_iface_modem_3gpp_reload_current_operator (<br>
> +        self,<br>> +        (GAsyncReadyCallback)update_registration_reload_current_operator_ready,<br>> +        user_data);<br>> +<br>>  }<br>><br>>  static void<br>> @@ -1044,6 +1168,7 @@ update_non_registered_state (MMIfaceModem3gpp *self,<br>
>  {<br>>      /* Not registered neither in home nor roaming network */<br>>      mm_iface_modem_3gpp_clear_current_operator (self);<br>> +    mm_iface_modem_3gpp_clear_current_vendor_pco_info(self);<br><br>

Whitespace before parenthesis needed.<br></div></div></div></div></div></blockquote><span style="color:rgb(80,0,80)"> </span><br>done <br><font color="#500050"><br></font><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><br>><br>>      /* The property in the interface is bound to the property<br>>       * in the skeleton, so just updating here is enough */<br>
> @@ -1081,20 +1206,20 @@ update_registration_state (MMIfaceModem3gpp *self,<br>><br>>      if (new_state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME ||<br>>          new_state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) {<br>
> -        /* If already reloading operator, skip it */<br>> -        if (ctx->reloading_operator)<br>> +        /* If already reloading registration info, skip it */<br>> +        if (ctx->reloading_registration_info)<br>
>              return;<br>><br>>          mm_info ("Modem %s: 3GPP Registration state changed (%s -> registering)",<br>>                   g_dbus_object_get_object_path (G_DBUS_OBJECT (self)),<br>
>                   mm_modem_3gpp_registration_state_get_string (old_state));<br>><br>> -        /* Reload current operator. ONLY update the state to REGISTERED after<br>> -         * having loaded operator code/name */<br>
> -        ctx->reloading_operator = TRUE;<br>> -        mm_iface_modem_3gpp_reload_current_operator (<br>> +        /* Reload current registration info - vendor PCO info and operator.<br>> +         * ONLY update the state to REGISTERED after having loaded operator code/name */<br>
> +        ctx->reloading_registration_info = TRUE;<br>> +        mm_iface_modem_3gpp_reload_current_vendor_pco_info (<br>>              self,<br>> -            (GAsyncReadyCallback)update_registration_reload_current_operator_ready,<br>
> +            (GAsyncReadyCallback)update_registration_reload_current_vendor_pco_info_ready,<br>>              GUINT_TO_POINTER (new_state));<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


</blockquote>Instead of chaining the PCO update and the current operator info update<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote> with separate calls; just include within reload_current_operator() the<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>logic to update the PCO info in addition to operator code and such. If<br><blockquote class="gmail_quote " style="margin:0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;border-right-width:1px;border-right-color:rgb(204,204,204);border-right-style:solid;padding-left:1ex;padding-right:1ex">
</blockquote>the PCO should be updated whenever operator changes, you'll better<br>
handle that directly inside reload_current_öperator().<br></div></div></div></div></div></blockquote><font color="#500050"><br></font>i wanted to seperate the two since mm_iface_modem_3gpp_reload_current_vendor_pco_info() is called from connect_3gpp_ready() and there <br>
is no need to update the operator at the stage.<br><span style="color:rgb(80,0,80)"> </span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div class="gmail_extra"><div class="gmail_quote">
<div><div class="h5"><br><br>>          return;<br>>      }<br>> diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h<br>> index f4014c4..79342e6 100644<br>> --- a/src/mm-iface-modem-3gpp.h<br>
> +++ b/src/mm-iface-modem-3gpp.h<br>> @@ -34,6 +34,7 @@<br>>  #define MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED    "iface-modem-3gpp-ps-network-supported"<br>>  #define MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED   "iface-modem-3gpp-eps-network-supported"<br>
>  #define MM_IFACE_MODEM_3GPP_IGNORED_FACILITY_LOCKS  "iface-modem-3gpp-ignored-facility-locks"<br>> +#define MM_IFACE_MODEM_3GPP_VENDOR_PCO_INFO         "iface-modem-3gpp-vendor-pco-info"<br>><br>
>  #define MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK    \<br>>      (MM_MODEM_ACCESS_TECHNOLOGY_GSM |                       \<br>> @@ -176,6 +177,14 @@ struct _MMIfaceModem3gpp {<br>>                                            GAsyncResult *res,<br>
>                                            GError **error);<br>><br>> +    /* Loading of the Vendor PCO Info property */<br>> +    void (*load_vendor_pco_info) (MMIfaceModem3gpp *self,<br>> +                                  GAsyncReadyCallback callback,<br>
> +                                  gpointer user_data);<br>> +    gchar * (*load_vendor_pco_info_finish) (MMIfaceModem3gpp *self,<br>> +                                            GAsyncResult *res,<br>> +                                            GError **error);<br>
> +<br>>      /* Scan current networks, expect a GList of MMModem3gppNetworkInfo */<br>>      void (* scan_networks) (MMIfaceModem3gpp *self,<br>>                              GAsyncReadyCallback callback,<br>
> @@ -249,6 +258,15 @@ gboolean mm_iface_modem_3gpp_reload_current_operator_finish (MMIfaceModem3gpp *s<br>>                                                               GError **error);<br>>  void     mm_iface_modem_3gpp_clear_current_operator         (MMIfaceModem3gpp *self);<br>
><br>> +/* Request to reload vendor PCO info */<br>> +void     mm_iface_modem_3gpp_reload_current_vendor_pco_info        (MMIfaceModem3gpp *self,<br>> +                                                                    GAsyncReadyCallback callback,<br>
> +                                                                    gpointer user_data);<br>> +gboolean mm_iface_modem_3gpp_reload_current_vendor_pco_info_finish (MMIfaceModem3gpp *self,<br>> +                                                                    GAsyncResult *res,<br>
> +                                                                    GError **error);<br>> +void     mm_iface_modem_3gpp_clear_current_vendor_pco_info         (MMIfaceModem3gpp *self);<br>> +<br><br>

When is 'clear_current_vendor_pco_info()' used? Didn't see any use of it.<br></div></div></div></div></div></blockquote><font color="#500050"><br></font>in update_non_registered_state()<br>see above.<br><span style="color:rgb(80,0,80)"> </span><br>
<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="gmail_extra"><div class="gmail_quote">
<div class="im"><br>>  /* Allow registering in the network */<br>>  gboolean mm_iface_modem_3gpp_register_in_network_finish (MMIfaceModem3gpp *self,<br>>                                                           GAsyncResult *res,<br>
><br><br><br>--<br>

<span><font color="#888888">Aleksander<br>
</font></span></div></div></div></div>
</blockquote></div><br></div></div>