Todays snapshot (23/5) infocolumn still does not work
list Lars Ebeling
Running hobbit on HP-UX 11.11 I get this:
$ gdb /home/hobbit/server/bin/hobbitsvc.cgi ./core GNU gdb 5.3 Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "hppa2.0n-hp-hpux11.00"... Core was generated by `hobbitsvc.cgi'. Program terminated with signal 11, Segmentation fault. warning: The shared libraries were not privately mapped; setting a breakpoint in a shared library will not work until you rerun the program. Reading symbols from /usr/local/lib/libpcre.sl...done. Reading symbols from /usr/lib/libnsl.1...done. Reading symbols from /usr/lib/libxti.2...done. Reading symbols from /usr/lib/libc.2...done. Reading symbols from /usr/lib/libdld.2...done. #0 0x00012198 in criteriamatch (alert=0x7f7e66d8, crit=0x400070f8, rulecrit=0x0, anymatch=0x0, nexttime=0x0) at loadalerts.c:798 798 if (crit && alert->groups && (*(alert->groups)) && (crit->groups
pec || crit->exgroupspec)) { (gdb) bt #0 0x00012198 in criteriamatch (alert=0x7f7e66d8, crit=0x400070f8, rulecrit=0x0, anymatch=0x0, nexttime=0x0) at loadalerts.c:798 #1 0x0001272c in next_recipient (alert=0x7f7e66d8, first=0x7f7e6b98, anymatch=0x0, nexttime=0x0) at loadalerts.c:964 #2 0x000128b0 in have_recipient (alert=0x25d80, anymatch=0x40008bf8) at loadalerts.c:1012 #3 0x00005938 in generate_hobbit_alertinfo ( hostname=0x40000b10 <Address 0x40000b10 out of bounds>, buf=0x40007000) at hobbitsvc-info.c:197 #4 0x0000745c in generate_info (hostname=0x40006b50 "leopg9") at hobbitsvc-info.c:760 #5 0x000042c0 in do_request () at hobbitsvc.c:183 #6 0x00005008 in main (argc=4, argv=0x7f7e05f0) at hobbitsvc.c:467 (gdb)
Regards
Lars Ebeling
http://leopg9.no-ip.org
Hobbithobbyist
"It is better to keep your mouth shut and appear stupid than to open it and remove all doubt."
-- Mark Twain
list Henrik Størner
▸
On Tue, May 23, 2006 at 06:08:04AM +0200, lars ebeling wrote:
#0 0x00012198 in criteriamatch (alert=0x7f7e66d8, crit=0x400070f8,
rulecrit=0x0, anymatch=0x0, nexttime=0x0) at loadalerts.c:798
798 if (crit && alert->groups && (*(alert->groups)) && (crit->groups
Oops... Try this, I'm sure it fixes it.
Regards,
Henrik
-------------- next part --------------
--- web/hobbitsvc-info.c 2006/05/19 12:02:55 1.103
+++ web/hobbitsvc-info.c 2006/05/23 05:40:12
@@ -170,7 +170,7 @@
static void generate_hobbit_alertinfo(char *hostname, strbuffer_t *buf)
{
namelist_t *hi = hostinfo(hostname);
- activealerts_t alert;
+ activealerts_t *alert;
char l[1024];
int i, rcount;
@@ -178,23 +178,20 @@
addtobuffer(buf, l);
addtobuffer(buf, "<tr><th>Service</th><th>Recipient</th><th>1st Delay</th><th>Stop after</th><th>Repeat</th><th>Time of Day</th><th>Colors</th></tr>\n");
- alert.hostname = hostname;
- alert.location = (hi ? hi->page->pagepath : "");
- strcpy(alert.ip, "127.0.0.1");
- alert.color = COL_RED;
- alert.pagemessage = "";
- alert.ackmessage = NULL;
- alert.eventstart = 0;
- alert.nextalerttime = 0;
- alert.state = A_PAGING;
- alert.cookie = 12345;
- alert.next = NULL;
+ alert = calloc(1, sizeof(activealerts_t));
+ alert->hostname = hostname;
+ alert->location = (hi ? hi->page->pagepath : "");
+ strcpy(alert->ip, "127.0.0.1");
+ alert->color = COL_RED;
+ alert->pagemessage = "";
+ alert->state = A_PAGING;
+ alert->cookie = 12345;
rcount = 0;
alert_printmode(1);
for (i = 0; (i < testcount); i++) {
- alert.testname = tnames[i].name;
- if (have_recipient(&alert, NULL)) { rcount++; print_alert_recipients(&alert, buf); }
+ alert->testname = tnames[i].name;
+ if (have_recipient(alert, NULL)) { rcount++; print_alert_recipients(alert, buf); }
}
if (rcount == 0) {
@@ -202,6 +199,8 @@
addtobuffer(buf, "<tr><td colspan=9 align=center><b><i>No alerts defined</i></b></td></tr>\n");
}
addtobuffer(buf, "</table>\n");
• + xfree(alert);
}
list Lars Ebeling
It works Lars
▸
----- Original Message -----
From: "Henrik Stoerner" <user-ce4a2c883f75@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Tuesday, May 23, 2006 7:42 AM
Subject: Re: [hobbit] Todays snapshot (23/5) infocolumn still does not work
On Tue, May 23, 2006 at 06:08:04AM +0200, lars ebeling wrote:#0 0x00012198 in criteriamatch (alert=0x7f7e66d8, crit=0x400070f8, rulecrit=0x0, anymatch=0x0, nexttime=0x0) at loadalerts.c:798 798 if (crit && alert->groups && (*(alert->groups)) && (crit->groupsOops... Try this, I'm sure it fixes it. Regards, Henrik