summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-08-18 20:11:29 +0000
committerLuke Leighton <lkcl@samba.org>1999-08-18 20:11:29 +0000
commit3d4b2c8b5e258ffba5a5c9bf49796e9750013020 (patch)
tree3e9b75ad177088cea14539bae979be0b0cdfb15e /source3/rpcclient
parentf221bfa4ace27b898c9326b1d81df59e0ceba032 (diff)
downloadsamba-3d4b2c8b5e258ffba5a5c9bf49796e9750013020.tar.gz
samba-3d4b2c8b5e258ffba5a5c9bf49796e9750013020.tar.bz2
samba-3d4b2c8b5e258ffba5a5c9bf49796e9750013020.zip
event log update
(This used to be commit bcc1212b07c71256fad93d82a996fa86b27db250)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_eventlog.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/rpcclient/cmd_eventlog.c b/source3/rpcclient/cmd_eventlog.c
index e6e10c44eb..e3179ee043 100644
--- a/source3/rpcclient/cmd_eventlog.c
+++ b/source3/rpcclient/cmd_eventlog.c
@@ -41,9 +41,10 @@ extern FILE* out_hnd;
void cmd_eventlog(struct client_info *info)
{
uint16 nt_pipe_fnum;
- BOOL res = True;
+ BOOL res = True;
+ BOOL res1 = True;
POLICY_HND hnd;
- uint32 number;
+ uint32 number = 0;
uint32 flags;
uint32 offset;
uint32 num_of_bytes;
@@ -60,17 +61,17 @@ void cmd_eventlog(struct client_info *info)
}
/* open scheduler session. */
- res = res ? cli_nt_session_open(smb_cli, PIPE_EVENTLOG, &nt_pipe_fnum) : False;
+ res1 = res1 ? cli_nt_session_open(smb_cli, PIPE_EVENTLOG, &nt_pipe_fnum) : False;
- res = res ? do_event_open(smb_cli, nt_pipe_fnum, journal, &hnd) : False;
+ res1 = res1 ? do_event_open(smb_cli, nt_pipe_fnum, journal, &hnd) : False;
- res = res ? do_event_numofeventlogrec(smb_cli, nt_pipe_fnum, &hnd, &number) : False;
+ res = res1 ? do_event_numofeventlogrec(smb_cli, nt_pipe_fnum, &hnd, &number) : False;
fprintf(out_hnd, "Number of events: %d\n", number);
display_eventlog_eventrecord(out_hnd, ACTION_HEADER, &ev);
- for (offset=0; offset<number; offset++)
+ for (offset = 0; offset < number && res; offset++)
{
num_of_bytes=0;
@@ -87,7 +88,7 @@ void cmd_eventlog(struct client_info *info)
display_eventlog_eventrecord(out_hnd, ACTION_FOOTER, &ev);
- res = res ? do_event_close(smb_cli, nt_pipe_fnum, &hnd): False;
+ res1 = res1 ? do_event_close(smb_cli, nt_pipe_fnum, &hnd): False;
/* close the session */
cli_nt_session_close(smb_cli, nt_pipe_fnum);