From: Tom Keiser Date: Mon, 30 Jun 2008 18:28:47 +0000 (+0000) Subject: DEVEL15-dafs-state-analyzer-setup-cursor-20080630 X-Git-Tag: openafs-devel-1_5_50~56 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=66c37688501f57f6d0f74689321c795f0550cdea;p=packages%2Fo%2Fopenafs.git DEVEL15-dafs-state-analyzer-setup-cursor-20080630 LICENSE IPL10 avoid an uninitialized cursor (cherry picked from commit db13ad4de73814e90b108faa0d1246e224836ece) --- diff --git a/src/tviced/state_analyzer.c b/src/tviced/state_analyzer.c index 1919030c3..7469e08fe 100644 --- a/src/tviced/state_analyzer.c +++ b/src/tviced/state_analyzer.c @@ -1827,6 +1827,12 @@ get_fe(afs_uint32 idx) static int get_fe_hdr(void) { + if (!fe_cursor.cursor) { + if(get_fe(fe_cursor.idx)) { + return 1; + } + } + memcpy(&fe_cursor.hdr, fe_cursor.cursor, sizeof(struct callback_state_entry_header)); fe_cursor.hdr_valid = 1; return 0;