summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-12-06 21:31:17 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-12-17 12:17:32 +0100
commit4f99f6fcb1e36a64d768c731951cfe8aedce67f2 (patch)
tree4fbc14d6237d4bb9e9420d65e633e0e8e9eb2a7a
parent1158852ace0c2a800f46898f7486f2a103b96bf5 (diff)
Set id in osinfo_install_config_param_new
OsinfoInstallConfigParam is an OsinfoEntity, but its _new method does not set an id when creating it. This is needed if we want to be able to use an OsinfoInstallConfigParamList. The "name" argument that is passed at creation time is expected to be unique, so we can use that as the entity id even though a full URI would have been nicer.
-rw-r--r--osinfo/osinfo_install_config_param.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/osinfo/osinfo_install_config_param.c b/osinfo/osinfo_install_config_param.c
index 68b80f6..d8502df 100644
--- a/osinfo/osinfo_install_config_param.c
+++ b/osinfo/osinfo_install_config_param.c
@@ -207,7 +207,10 @@ osinfo_install_config_param_init (OsinfoInstallConfigParam *config_param)
*/
OsinfoInstallConfigParam *osinfo_install_config_param_new(const gchar *name)
{
- return g_object_new(OSINFO_TYPE_INSTALL_CONFIG_PARAM, "name", name, NULL);
+ return g_object_new(OSINFO_TYPE_INSTALL_CONFIG_PARAM,
+ "id", name,
+ "name", name,
+ NULL);
}
/**