gmediaserver-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gmediaserver-devel] patch - multiple directories bug in 0.12


From: rburdick
Subject: [gmediaserver-devel] patch - multiple directories bug in 0.12
Date: Fri, 17 Nov 2006 08:34:22 -0000
User-agent: SquirrelMail/1.4.5

It looks like the fix for the segfault when handling multiple directories
actually broke multiple directory entries from working at all.

Basically, the root entry has to be the first entry created, in order for
it to get the id zero.  (This is how 0.11 worked, but the make_entry call
was moved in 0.12).

Currently, the first directory entered on the command line gets the entry
zero, so when queried, that directory is the only one sent back.

Oh, I also added the root_entry->id as the parent for the directories, as
it made no sense to me that they would not have parents, when the root is
their parent.

Thanks for the great work.

Richard Burdick
(Please don't publish my email address)


--- metadata.c.org      2006-11-16 23:52:16.000000000 -0800
+++ metadata.c  2006-11-17 00:11:54.000000000 -0800
@@ -978,6 +978,7 @@
        uint32_t c;
        uint32_t child_count = 0;

+       root_entry = make_entry(ROOT_ENTRY_NAME, -1, true);
        children = xmalloc(sizeof(int32_t) * pathc);
        for (c = 0; c < pathc; c++) {
            Entry *entry;
@@ -995,13 +996,13 @@
                free(tmp);
             }

-           entry = scan_entry(pathv[c], name, -1, indent_size, NULL);
+           entry = scan_entry(pathv[c], name, root_entry->id, indent_size,
+                              NULL);
            if (entry != NULL)
                children[child_count++] = entry->id;
            free(name);
        }
        if (child_count != 0) {
-           root_entry = make_entry(ROOT_ENTRY_NAME, -1, true);
            detail = get_entry_detail(root_entry, DETAIL_CHILDREN);
            detail->data.children.count = child_count;
            detail->data.children.list = children;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]