[Galago-commits] r2692 - in trunk/galago-daemon: . src
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Mon Apr 10 00:08:28 PDT 2006
Author: chipx86
Date: 2006-04-10 00:08:23 -0700 (Mon, 10 Apr 2006)
New Revision: 2692
Modified:
trunk/galago-daemon/ChangeLog
trunk/galago-daemon/src/core.c
trunk/galago-daemon/src/meta-person.c
trunk/galago-daemon/src/person-list.c
Log:
Fix a bug where meta-people, after merging, wouldn't end up in the meta people table.
Modified: trunk/galago-daemon/ChangeLog
===================================================================
--- trunk/galago-daemon/ChangeLog 2006-04-10 06:17:11 UTC (rev 2691)
+++ trunk/galago-daemon/ChangeLog 2006-04-10 07:08:23 UTC (rev 2692)
@@ -1,3 +1,11 @@
+Mon Apr 10 00:05:58 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
+
+ * src/core.c:
+ * src/meta-person.c:
+ * src/person-list.c:
+ - Fix a bug where meta-people, after merging, wouldn't end up in the
+ meta people table.
+
Sun Apr 09 23:16:42 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
* src/account.c:
Modified: trunk/galago-daemon/src/core.c
===================================================================
--- trunk/galago-daemon/src/core.c 2006-04-10 06:17:11 UTC (rev 2691)
+++ trunk/galago-daemon/src/core.c 2006-04-10 07:08:23 UTC (rev 2692)
@@ -365,7 +365,6 @@
dbus_message_iter_init(message, &iter);
dbus_message_iter_get_basic(&iter, &id);
- dbus_message_iter_next(&iter);
meta_person = galagod_people_get_meta_person(id);
Modified: trunk/galago-daemon/src/meta-person.c
===================================================================
--- trunk/galago-daemon/src/meta-person.c 2006-04-10 06:17:11 UTC (rev 2691)
+++ trunk/galago-daemon/src/meta-person.c 2006-04-10 07:08:23 UTC (rev 2692)
@@ -127,6 +127,15 @@
}
galagod_meta_person_destroy(src);
+
+ /* XXX This is a hack to get the new MetaPerson's ID in the table. */
+ if (galago_person_get_id(dest->person) != NULL)
+ {
+ g_hash_table_replace(meta_people_table,
+ g_strdup(galago_person_get_id(dest->person)),
+ dest);
+ }
+
}
GalagoPerson *
@@ -165,8 +174,8 @@
_galago_person_set_id(meta_person->person, person_id);
g_object_set_data(G_OBJECT(meta_person->person), "valid_uid_set",
GINT_TO_POINTER(TRUE));
- g_hash_table_insert(meta_people_table, g_strdup(person_id),
- meta_person);
+ g_hash_table_replace(meta_people_table, g_strdup(person_id),
+ meta_person);
}
common_meta_object_merge_attributes(GALAGO_OBJECT(meta_person->person),
Modified: trunk/galago-daemon/src/person-list.c
===================================================================
--- trunk/galago-daemon/src/person-list.c 2006-04-10 06:17:11 UTC (rev 2691)
+++ trunk/galago-daemon/src/person-list.c 2006-04-10 07:08:23 UTC (rev 2692)
@@ -247,6 +247,10 @@
/* Create our "Me" person. */
meta_me = galagod_meta_person_new();
galago_person_set_me(galagod_meta_person_get_person(meta_me));
+
+ g_hash_table_insert(meta_people_table,
+ g_strdup(galago_person_get_id(meta_me->person)),
+ meta_me);
}
void
More information about the galago-commits
mailing list