Dang unsigned values. Thanks for the report and the backtrace.
Here's a patch that should fix the problem. It only will occur if an
entity association record is the first entry in the SDRs.
-Corey
Index: lib/entity.c
===================================================================
RCS file: /cvsroot/openipmi/OpenIPMI/lib/entity.c,v
retrieving revision 1.163
diff -u -r1.163 entity.c
--- lib/entity.c 27 Oct 2006 03:04:11 -0000 1.163
+++ lib/entity.c 1 Nov 2006 14:02:23 -0000
@@ -3429,21 +3429,24 @@
that every unfound entity will only have one set of
contained entities in the cent array even if it has
multiple DLRs. It will always be in the first entry. */
- j = i - 1;
- ent = found->ent;
- while ((j > 0) && (ent == (infos->found+j)->ent)) {
- if ((infos->found+j)->found)
- goto next_ent;
- if ((infos->dlrs[j]->type != IPMI_ENTITY_EAR)
- && (infos->dlrs[j]->type != IPMI_ENTITY_DREAR))
- goto next_ent;
- found = infos->found+j;
-
- /* Since this is an EAR and we are putting it's entries in
- another place, ignore this one. */
- (infos->found+i)->found = 1;
- next_ent:
- j--;
+ if (i > 0) {
+ j = i - 1;
+ ent = found->ent;
+ for (; ent == (infos->found+j)->ent; j--) {
+ if ((infos->found+j)->found)
+ goto next_ent;
+ if ((infos->dlrs[j]->type != IPMI_ENTITY_EAR)
+ && (infos->dlrs[j]->type != IPMI_ENTITY_DREAR))
+ goto next_ent;
+ found = infos->found+j;
+
+ /* Since this is an EAR and we are putting it's entries in
+ another place, ignore this one. */
+ (infos->found+i)->found = 1;
+ next_ent:
+ if (j == 0)
+ break;
+ }
}
if (infos->dlrs[i]->is_ranges) {
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer