Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon1.gif   Problem with 'Show Attributes' option, posted by Heiko Scheit on Sat Feb 19 18:39:52 2005 patch
    icon2.gif   Re: Problem with 'Show Attributes' option, posted by Stefan Ritt on Sun Feb 20 15:30:04 2005 
Message ID: 953     Entry time: Sat Feb 19 18:39:52 2005     Reply to this: 954
Icon: Entry  Author: Heiko Scheit  Author Email: h.scheit@mpi-hd.mpg.de 
Category: Bug fix  OS: Linux  ELOG Version: 2.5.7 
Subject: Problem with 'Show Attributes' option 
There is a problem with the 'Show Attributes' option
causing the 'Format ...' options to be ignored.

See attachment for patch.
Attachment 1: patch  1 kB  | Hide | Hide all
--- elogd.c_20050219    Sat Feb 19 18:15:09 2005
+++ elogd.c     Sat Feb 19 18:25:55 2005
@@ -8169,7 +8169,7 @@
       if (format_flags[index] & AFF_SAME_LINE)
          /* if attribute on same line, do nothing */
          rsprintf("");
-      else if (index < n_attr - 1 && (format_flags[index + 1] & AFF_SAME_LINE)) {
+      else if (aindex < n_disp_attr - 1 && (format_flags[attr_index[aindex + 1]] & AFF_SAME_LINE)) {
          /* if next attribute on same line, start a new subtable */
          rsprintf("<tr><td colspan=2><table width=\"100%%\" cellpadding=0 cellspacing=0><tr>");
          subtable = 1;
@@ -8469,7 +8469,7 @@
          }
       }
 
-      if (index < n_attr - 1 && (format_flags[index + 1] & AFF_SAME_LINE) == 0) {
+      if (aindex < n_disp_attr - 1 && (format_flags[attr_index[aindex + 1]] & AFF_SAME_LINE) == 0) {
          /* if next attribute not on same line, close row or subtable */
          if (subtable) {
             rsprintf("</table></td></tr>\n");
@@ -8479,7 +8479,7 @@
       }
 
       /* if last attribute, close row or subtable */
-      if (index == n_attr - 1) {
+      if (aindex == n_disp_attr - 1) {
          if (subtable) {
             rsprintf("</table></td></tr>\n");
             subtable = 0;
ELOG V3.1.5-fe60aaf