aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2014-04-09 18:22:36 +0200
committerAleksander Morgado <aleksander@aleksander.es>2019-12-03 08:43:39 +0000
commite60132284be762323519e6a2b3f3f4d91ee5382b (patch)
tree6e079cea2f675c830b45173675dce5d5e9d09e45
parentf7418da3bc26dbbd03a3961f48462e8577fc944e (diff)
libmm-glib: SID value '0' is actually a good one
-rw-r--r--libmm-glib/mm-cdma-manual-activation-properties.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmm-glib/mm-cdma-manual-activation-properties.c b/libmm-glib/mm-cdma-manual-activation-properties.c
index d5c1f921..17dab443 100644
--- a/libmm-glib/mm-cdma-manual-activation-properties.c
+++ b/libmm-glib/mm-cdma-manual-activation-properties.c
@@ -42,6 +42,7 @@ struct _MMCdmaManualActivationPropertiesPrivate {
/* Mandatory parameters */
gchar *spc;
guint16 sid;
+ gboolean sid_set;
gchar *mdn;
gchar *min;
/* Optional */
@@ -161,6 +162,7 @@ mm_cdma_manual_activation_properties_set_sid (MMCdmaManualActivationProperties *
{
g_return_if_fail (MM_IS_CDMA_MANUAL_ACTIVATION_PROPERTIES (self));
+ self->priv->sid_set = TRUE;
self->priv->sid = sid;
}
@@ -593,7 +595,7 @@ mm_cdma_manual_activation_properties_get_dictionary (MMCdmaManualActivationPrope
"{sv}",
PROPERTY_SPC,
g_variant_new_string (self->priv->spc));
- if (self->priv->sid)
+ if (self->priv->sid_set)
g_variant_builder_add (&builder,
"{sv}",
PROPERTY_SID,
@@ -751,7 +753,7 @@ mm_cdma_manual_activation_properties_new_from_dictionary (GVariant *dictionary,
/* If mandatory properties missing, destroy the object */
if (!self->priv->spc ||
- !self->priv->sid ||
+ !self->priv->sid_set ||
!self->priv->mdn ||
!self->priv->min) {
g_set_error (error,