summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2012-01-06 16:15:58 +0200
committerTanu Kaskinen <tanuk@iki.fi>2012-01-28 16:43:49 +0200
commitea2b80b20a919322af61cd31e381e9b70a4b918e (patch)
tree5995f863ce8b86d2ff3420cbc129375f43be952f /src
parente5a3d400803a2d36de98d9878469d4214af1f085 (diff)
stream-restore: Don't verify entry validity needlessly.
clean_up_db() makes sure that all entries in the database are valid.
Diffstat (limited to 'src')
-rw-r--r--src/modules/module-stream-restore.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c
index d1c87285..23889ca0 100644
--- a/src/modules/module-stream-restore.c
+++ b/src/modules/module-stream-restore.c
@@ -2460,22 +2460,14 @@ int pa__init(pa_module*m) {
pa_datum next_key;
char *name;
struct dbus_entry *de;
- struct entry *e;
-
- done = !pa_database_next(u->database, &key, &next_key, NULL);
name = pa_xstrndup(key.data, key.size);
- pa_datum_free(&key);
-
- /* Use entry_read() for checking that the entry is valid. */
- if ((e = entry_read(u, name))) {
- de = dbus_entry_new(u, name);
- pa_assert_se(pa_hashmap_put(u->dbus_entries, de->entry_name, de) == 0);
- entry_free(e);
- }
-
+ de = dbus_entry_new(u, name);
+ pa_assert_se(pa_hashmap_put(u->dbus_entries, de->entry_name, de) == 0);
pa_xfree(name);
+ done = !pa_database_next(u->database, &key, &next_key, NULL);
+ pa_datum_free(&key);
key = next_key;
}
#endif