cdma: fix segfault by handling MEID property
Also, MEID->Meid to follow standard D-Bus property semantics.
This commit is contained in:
@@ -93,7 +93,7 @@
|
|||||||
</arg>
|
</arg>
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
<property name="MEID" type="s" access="read">
|
<property name="Meid" type="s" access="read">
|
||||||
<tp:docstring>
|
<tp:docstring>
|
||||||
The modem's Mobile Equipment Identifier.
|
The modem's Mobile Equipment Identifier.
|
||||||
</tp:docstring>
|
</tp:docstring>
|
||||||
|
@@ -68,6 +68,8 @@ typedef struct {
|
|||||||
|
|
||||||
guint poll_id;
|
guint poll_id;
|
||||||
|
|
||||||
|
char *meid;
|
||||||
|
|
||||||
MMModemCdmaRegistrationState cdma_1x_reg_state;
|
MMModemCdmaRegistrationState cdma_1x_reg_state;
|
||||||
MMModemCdmaRegistrationState evdo_reg_state;
|
MMModemCdmaRegistrationState evdo_reg_state;
|
||||||
|
|
||||||
@@ -2279,6 +2281,9 @@ get_property (GObject *object, guint prop_id,
|
|||||||
case MM_MODEM_PROP_TYPE:
|
case MM_MODEM_PROP_TYPE:
|
||||||
g_value_set_uint (value, MM_MODEM_TYPE_CDMA);
|
g_value_set_uint (value, MM_MODEM_TYPE_CDMA);
|
||||||
break;
|
break;
|
||||||
|
case MM_MODEM_CDMA_PROP_MEID:
|
||||||
|
g_value_set_string (value, priv->meid);
|
||||||
|
break;
|
||||||
case PROP_EVDO_REV0:
|
case PROP_EVDO_REV0:
|
||||||
g_value_set_boolean (value, priv->evdo_rev0);
|
g_value_set_boolean (value, priv->evdo_rev0);
|
||||||
break;
|
break;
|
||||||
@@ -2331,6 +2336,10 @@ mm_generic_cdma_class_init (MMGenericCdmaClass *klass)
|
|||||||
MM_MODEM_PROP_TYPE,
|
MM_MODEM_PROP_TYPE,
|
||||||
MM_MODEM_TYPE);
|
MM_MODEM_TYPE);
|
||||||
|
|
||||||
|
g_object_class_override_property (object_class,
|
||||||
|
MM_MODEM_CDMA_PROP_MEID,
|
||||||
|
MM_MODEM_CDMA_MEID);
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_EVDO_REV0,
|
g_object_class_install_property (object_class, PROP_EVDO_REV0,
|
||||||
g_param_spec_boolean (MM_GENERIC_CDMA_EVDO_REV0,
|
g_param_spec_boolean (MM_GENERIC_CDMA_EVDO_REV0,
|
||||||
"EVDO rev0",
|
"EVDO rev0",
|
||||||
|
@@ -357,6 +357,15 @@ mm_modem_cdma_init (gpointer g_iface)
|
|||||||
if (initialized)
|
if (initialized)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* Properties */
|
||||||
|
g_object_interface_install_property
|
||||||
|
(g_iface,
|
||||||
|
g_param_spec_string (MM_MODEM_CDMA_MEID,
|
||||||
|
"MEID",
|
||||||
|
"MEID",
|
||||||
|
NULL,
|
||||||
|
G_PARAM_READABLE));
|
||||||
|
|
||||||
/* Signals */
|
/* Signals */
|
||||||
signals[SIGNAL_QUALITY] =
|
signals[SIGNAL_QUALITY] =
|
||||||
g_signal_new ("signal-quality",
|
g_signal_new ("signal-quality",
|
||||||
|
@@ -35,6 +35,14 @@ typedef enum {
|
|||||||
|
|
||||||
#define MM_MODEM_CDMA_REGISTRATION_STATE_CHANGED "registration-state-changed"
|
#define MM_MODEM_CDMA_REGISTRATION_STATE_CHANGED "registration-state-changed"
|
||||||
|
|
||||||
|
#define MM_MODEM_CDMA_MEID "meid"
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
MM_MODEM_CDMA_PROP_FIRST = 0x1200,
|
||||||
|
|
||||||
|
MM_MODEM_CDMA_PROP_MEID = MM_MODEM_CDMA_PROP_FIRST,
|
||||||
|
} MMModemCdmaProp;
|
||||||
|
|
||||||
typedef struct _MMModemCdma MMModemCdma;
|
typedef struct _MMModemCdma MMModemCdma;
|
||||||
|
|
||||||
typedef void (*MMModemCdmaServingSystemFn) (MMModemCdma *modem,
|
typedef void (*MMModemCdmaServingSystemFn) (MMModemCdma *modem,
|
||||||
|
Reference in New Issue
Block a user