X hits on this document

PDF document

February 10, 2006 - page 199 / 238

537 views

0 shares

0 downloads

0 comments

199 / 238

static sdata_t * a l l o c _ s d a t a ( i p m i _ s e n s o r _ t * s e n s o r { )

s d a t a _ t * s d a t a ;

sdata = malloc(sizeof(*sdata)); if (!sdata) return NULL;

s d a t a - > e s = m a l l o c ( i p m i _ e v e n t _ s t a t e _ s i z e ( if (!sdata->es) { ) ) ;

free(sdata); return NULL; } ipmi_event_state_init(sdata->es);

s d a t a - > t h = m a l l o c ( i p m i _ t h r e s h o l d s _ s i z e ( ) if (!sdata->th) { ) ;

free(sdata->es); free(sdata); return NULL; } i p m i _ t h r e s h o l d s _ i n i t ( s d a t a - > t h ) ;

sdata->refcount = 1;

s d a t a - > s e n s o r _ i d = i p m i _ s e n s o r _ c o n v e r t _ t o _ i d ( s e n s o r ) ipmi_sensor_get_name(sensor, sdata->name, sizeof(sdata->name)); ;

s d a t a - > n e x t = s d a t a _ l i s t sdata->prev = NULL; sdata_list = sdata; ;

return sdata;

}

static sdata_t * find_sdata(ipmi_sensor_t *sensor) {

i p m i _ s e n s o r _ i d _ t i d = i p m i _ s e n s o r _ c o n v e r t _ t o _ i d ( s e n s o r ) ;

sdata t

_

*link;

l i n k = s d a t a _ l i s t while (link) { ;

i f ( i p m i _ c m p _ s e n s o r _ i d ( i d , l i n k - > s e n s o r _ i d ) = = return link; 0 )

187

Document info
Document views537
Page views537
Page last viewedSun Dec 04 04:31:41 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments