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-20 17:43:47 +0100
commit8922cbf6b5dbf270a9d91277685b64ebce6669b3 (patch)
treee3ad9ad498637516e442fb228a5d1e31c33b57b5
parent789adb2af586add4ec49b50911e26bc627bdf00e (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 59a0048..541f066 100644
--- a/osinfo/osinfo_install_config_param.c
+++ b/osinfo/osinfo_install_config_param.c
@@ -209,7 +209,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);
}
/**