Index: auparse/auparse.c =================================================================== --- auparse/auparse.c (revision 123) +++ auparse/auparse.c (working copy) @@ -666,7 +666,7 @@ char *ptr; errno = 0; - ptr = strchr(s+10, ':'); + ptr = strchr(s+3, ':'); if (ptr) { e->serial = strtoul(ptr+1, NULL, 10); *ptr = 0; @@ -1033,7 +1033,7 @@ /* Accessors to event data */ const au_event_t *auparse_get_timestamp(auparse_state_t *au) { - if (au && au->le.e.sec != 0) + if (au && au->parse_state != EVENT_EMPTY) return &au->le.e; else return NULL; @@ -1251,7 +1251,7 @@ free(au->find_field); au->find_field = strdup(name); - if (au->le.e.sec) { + if (au->parse_state != EVENT_EMPTY) { const char *cur_name; rnode *r; @@ -1275,7 +1275,7 @@ errno = EINVAL; return NULL; } - if (au->le.e.sec) { + if (au->parse_state != EVENT_EMPTY) { int moved = 0; rnode *r = aup_list_get_cur(&au->le); @@ -1299,7 +1299,7 @@ /* Accessors to field data */ const char *auparse_get_field_name(auparse_state_t *au) { - if (au->le.e.sec) { + if (au->parse_state != EVENT_EMPTY) { rnode *r = aup_list_get_cur(&au->le); if (r) return nvlist_get_cur_name(&r->nv); @@ -1310,7 +1310,7 @@ const char *auparse_get_field_str(auparse_state_t *au) { - if (au->le.e.sec) { + if (au->parse_state != EVENT_EMPTY) { rnode *r = aup_list_get_cur(&au->le); if (r) return nvlist_get_cur_val(&r->nv); @@ -1321,7 +1321,7 @@ int auparse_get_field_type(auparse_state_t *au) { - if (au->le.e.sec) { + if (au->parse_state != EVENT_EMPTY) { rnode *r = aup_list_get_cur(&au->le); if (r) return nvlist_get_cur_type(r); @@ -1347,7 +1347,7 @@ const char *auparse_interpret_field(auparse_state_t *au) { - if (au->le.e.sec) { + if (au->parse_state != EVENT_EMPTY) { rnode *r = aup_list_get_cur(&au->le); if (r) return nvlist_interp_cur_val(r);