not proper HTML, posted by Heiko Scheit on Thu Jul 31 16:02:41 2003
|
I just upgraded from 2.3.5 to 2.3.9.
There are some errors in the generated HTML. Most of the time
the browser renders everything correctly but sometimes not. Please
check especially (http://validator.w3.org/):
- http://midas.psi.ch/elogdemo/Database/7
There are too many <table> tags before the attribute list:
'Type', 'Operating system',... This should be just one table and
not each row a separate table. Also the first <table> tag lies
outside a <td> tag of the enclosing table.
- http://midas.psi.ch/elogdemo/forum/ |
problem with boolean attributes, posted by Heiko Scheit on Fri Aug 1 13:18:42 2003
|
Boolean attributes were not displayed correctly in version 2.3.9.
Patch is attached. |
width of the textarea is too large (after reply), posted by Heiko Scheit on Mon Aug 4 14:02:52 2003
|
The width of the textarea after pressing reply is too large.
The problem is that the algorithm that searches for the longes line
looks for the next '\r' which it does not find and therefore takes the
number of characters in the text to be the width of the longest line.
To search for '\n' instead should solve the problem. Please find the
diff output below.
$ diff -c elogd.c elogd.c~
*** elogd.c Mon Aug 4 13:57:35 2003
--- elogd.c~ Fri Aug 1 13:13:09 2003
***************
*** 6028,6035 ****
p = text;
do
{
! /* pend = strchr(p, '\r'); */
! pend = strchr(p, '\n');
if (pend == NULL)
pend = p+strlen(p);
--- 6028,6034 ----
p = text;
do
{
! pend = strchr(p, '\r');
if (pend == NULL)
pend = p+strlen(p);
|
speed is very slow if logbook contains many entries, posted by Heiko Scheit on Wed Nov 12 12:25:44 2003
|
This is not really a bug, but elogd was getting really slow with our
logbook. It took about 4 1/2 seconds just to get the default page in
threaded mode with 15 entries. The logbook has in total about 2000
entries, though.
After playing around with the compiler option '-gp' and gprof the
problem was found: loc() is called about 18000 times per logbook
access! (Attached you can find the gprof output. There might be
other places where to save time: e.g. getcfg().) The function loc()
calls stat every time to check if the language file was updated and
this takes a long time especially over NFS.
The quick solution for me was to just replace loc() with 'char
*loc(char *orig) {return orig;}'. Therefore, I cannot use the
localization that I used anymore, which is not a big problem at the
moment. After that the time to download the default page was only
0.16 s; almost a factor of 30 faster!
I would suggest to only read the language file (AND also the config
file!) once upon startup. After changing things one has to restart
elogd, which is not so nice, but the long delay is not acceptable.
Another option not to restart elogd is to make elogd respond to a
signal (e.g. kill -HUP) to reread the config and language files. |
segmentation fault, posted by Heiko Scheit on Fri Feb 13 12:18:19 2004
|
Around line 2240 (in loc()) in elogd.c the following is written,
which results in an infinite loop, since loc() recursively with
the same argument "Change %s".
/* special case: "Change %s" */
if (strstr(orig, "Change ")) {
sprintf(result, loc("Change %s"), orig + 7);
return result;
}
For now I just commented these lines. |
elog (not elogd) submit does not work anymore, posted by Heiko Scheit on Fri Feb 13 12:21:25 2004
|
Somehow elog does not use the -s option (subdir) anymore,
resulting in a 'HTTP/1.1 404 Not Found' error.
For now I am using elog from version 2.3.9 together with elogd v2.5.0,
which seems to work OK. |
-W -Wall options (using gcc), posted by Heiko Scheit on Fri Feb 13 12:25:15 2004
|
Maybe consider using the options -W -Wall when compiling elogd.
There are several warning messages. |
Re: -W -Wall options (using gcc), posted by Heiko Scheit on Mon Feb 16 16:40:50 2004
|
> So I fixed all compiler generated warnigns except these:
>
> [midas@pc2075 ~/elog]$ gcc -g -O -W -Wall -o elogd src/elogd.c
> src/elogd.c: In function `set_cookie':
> src/elogd.c:4675: warning: `%y' yields only last 2 digits of year
> src/elogd.c: In function `send_file_direct':
> src/elogd.c:5483: warning: `%y' yields only last 2 digits of year
> src/elogd.c: In function `show_elog_list':
> src/elogd.c:11938: warning: `%x' yields only last 2 digits of year in some
> locales
> src/elogd.c:11957: warning: `%x' yields only last 2 digits of year in some
> locales
> src/elogd.c:11979: warning: `%x' yields only last 2 digits of year in some
> locales
> src/elogd.c:11987: warning: `%x' yields only last 2 digits of year in some
> locales
> src/elogd.c: In function `ctrlc_handler':
> src/elogd.c:15864: warning: empty body in an if-statement
> src/elogd.c: In function `hup_handler':
> src/elogd.c:15870: warning: empty body in an if-statement
>
> Do you know how to disable these warnings or any other workaround? I would
> like to compile without any remaining warnings.
Have a look at the gcc info pages:
$ info gcc "invoking gcc" "warning options" |