Hi, I couldn't get much information before I had to kill gdb because of a stupid error. But I think I located the problem and the patch should work as a fix. My is not optimal. IMO, it would be better to cache the result from header_get() and use it as parameter for parq_download_parse_queue_status().
** ERROR **: file /cvs/gtk-gnutella-current/src/parq.c: line 275
(parq_download_parse_queue_status): assertion failed: (buf != NULL)
aborting...
Program received signal SIGABRT, Aborted.
0x485a3933 in kill () from /usr/lib/libc.so.12
(gdb) bt
#0 0x485a3933 in kill () from /usr/lib/libc.so.12
#1 0x485a31ec in abort () from /usr/lib/libc.so.12
#2 0x482a537c in g_logv () from /usr/pkg/lib/libglib.so.13
#3 0x482a5429 in g_log () from /usr/pkg/lib/libglib.so.13
#4 0x080f0b57 in parq_download_parse_queue_status (d=0x889cc78,
header=0x8a447c0) at /cvs/gtk-gnutella-current/src/parq.c:298
#5 0x080c1240 in download_request (d=0x889cc78, header=0x8a447c0, ok=1)
at /cvs/gtk-gnutella-current/src/downloads.c:4332
#6 0x080be9db in call_download_request (o=0x889cc78, header=0x8a447c0)
at /cvs/gtk-gnutella-current/src/downloads.c:3262
#7 0x080d10e6 in io_header_parse (ih=0x842f3f0)
at /cvs/gtk-gnutella-current/src/ioheader.c:282
#8 0x080efdd8 in inputevt_dispatch (source=0x8ae8e20, condition=0,
data=0x87db870) at /cvs/gtk-gnutella-current/src/inputevt.c:88
#9 0x482a15a0 in g_io_unix_dispatch () from /usr/pkg/lib/libglib.so.13
#10 0x482a2c3e in g_main_dispatch () from /usr/pkg/lib/libglib.so.13
#11 0x482a3237 in g_main_iterate () from /usr/pkg/lib/libglib.so.13
#12 0x482a33cc in g_main_run () from /usr/pkg/lib/libglib.so.13
#13 0x481c463b in gtk_main () from /usr/X11R6/lib/libgtk.so.12
#14 0x0809e8c6 in main_gui_run ()
at /cvs/gtk-gnutella-current/src/main_gui.c:565
#15 0x080cf13b in main (argc=1, argv=0xbfbfb990)
at /cvs/gtk-gnutella-current/src/main.c:425
#16 0x08050730 in ___start ()
(gdb) f 4
#4 0x080f0b57 in parq_download_parse_queue_status (d=0x889cc78,
header=0x8a447c0) at /cvs/gtk-gnutella-current/src/parq.c:298
298 break;
(gdb) inf lo
buf = (gchar *) 0x0
value = (gchar *) 0x0
major = 135427814
minor = -1077954808
header_value_length = 144984000
retry = 0
(gdb) p *d
$1 = {error_str = "No download slot", '\0' <repeats 239 times>, status =
6, io_opaque = 0x842f3f0, bio = 0x0, server = 0x8495930,
list_idx = DL_LIST_RUNNING, file_info = 0x846b460,
record_index = 4294967295,
file_name = 0x8443744"urn:sha1:--------------------",
file_size= 735002624, size = 4651915, skip = 555908, pos = 555908,
range_end = 735002624, socket = 0x8a3a000, file_desc = -1,
overlap_size = 4096, start_date = 0, last_update = 1046402685,
last_gui_update = 1046402685, record_stamp = 1046402678, retries = 0,
timeout_delay = 0, remove_msg = 0x889cc78 "No download slot", sha1 =
0x8400aa4"-------------------", last_dmesh=1046402680, ranges =
0x0, ranges_size = 0, sinkleft = 0, flags = 8, keep_alive = 0, visible
= 1, push = 0, always_push = 0, queue_status ={position = 0, length =
0, ETA = 0, lifetime = 0, retry_delay = 0, ID = '\0'<repeats 40
times>}}(gdb) p *header$2 = {headers = 0x8a44880, fields = 0x87972d0,
flags = 1, size = 1265, lines = 18}
Christian
Index: parq.c
===================================================================
RCS file: /cvsroot/gtk-gnutella/gtk-gnutella-current/src/parq.c,v
retrieving revision 1.6
diff -u -r1.6 parq.c
--- parq.c 22 Feb 2003 22:43:21 -0000 1.6
+++ parq.c 28 Feb 2003 04:10:23 -0000
@@ -271,6 +271,8 @@
g_assert(header != NULL);
buf = header_get(header, "X-Queue");
+ if (NULL == buf)
+ buf = header_get(header, "X-Queued");
g_assert(buf != NULL);
pgp00000.pgp
Description: PGP signature
