[gssdp] socket-source: Make index int
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp] socket-source: Make index int
- Date: Sun, 11 Nov 2018 06:19:50 +0000 (UTC)
commit 7edd9eb3313c934483d8d15f8218aa882f2063ab
Author: Jens Georg <mail jensge org>
Date: Sun Nov 11 07:02:25 2018 +0100
socket-source: Make index int
This allows to use -1 as "unknown index"
libgssdp/gssdp-socket-source.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libgssdp/gssdp-socket-source.c b/libgssdp/gssdp-socket-source.c
index ae2dbf4..6ad895d 100644
--- a/libgssdp/gssdp-socket-source.c
+++ b/libgssdp/gssdp-socket-source.c
@@ -51,7 +51,7 @@ struct _GSSDPSocketSourcePrivate {
GInetAddress *address;
char *device_name;
- guint index;
+ gint index;
guint ttl;
guint port;
};
@@ -140,7 +140,7 @@ gssdp_socket_source_set_property (GObject *object,
priv->port = g_value_get_uint (value);
break;
case PROP_IFA_IDX:
- priv->index = g_value_get_uint (value);
+ priv->index = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -523,12 +523,12 @@ gssdp_socket_source_class_init (GSSDPSocketSourceClass *klass)
g_object_class_install_property
(object_class,
PROP_IFA_IDX,
- g_param_spec_uint
+ g_param_spec_int
("index",
"Interface index",
"Interface index of the network device",
- 0, G_MAXUINT16,
- 0,
+ -1, G_MAXUINT16,
+ -1,
G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]