Package: gmediaserver
Version: 0.12.0-1
Severity: important
Tags: patch
As the subject says, if you specify multiple directories to be shared in
version 0.12, only the first specified gets shared. The rest are
ignored.
Entries are assigned ids based on the order that they are processed.
The entry that is assigned id 0 (zero) is the root entry. In 0.12 a fix
was made to stop segfaulting when multiple directories were
specified. As part of the fix, the creation of the root entry was
moved, and now the first directory specified gets created as id 0, so it
becomes root. The other entries are created, but never actually put
into the tree.
The fix is just to move the creation of the root entry back to be
the first created.
My patch also assigns the root as the parent of it's children, as it
made no sense to me that they would not have parents, when the root is
their parent. I'm not actually sure this is necessary, but it's been
working for me for weeks.
Note: My system is reported as 3.1, and this is not a 3.1 package, but I
installed this from upstream and had to fix it myself. I tried sending
in a patch to the upstream mailing list, but I got a reply indicating my
email was being moderated, and I haven't seen it on the list yet.
Richard Burdick
--- 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;
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.12-rgb+ndiswrapper+hostap+suspend2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]