Author: jerry
Date: 2005-08-17 13:41:27 +0000 (Wed, 17 Aug 2005)
New Revision: 9363

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9363

Log:
some control_eventlog_hook() fixes from Marcin
Modified:
   trunk/source/rpc_server/srv_eventlog_nt.c


Changeset:
Modified: trunk/source/rpc_server/srv_eventlog_nt.c
===================================================================
--- trunk/source/rpc_server/srv_eventlog_nt.c   2005-08-17 13:40:06 UTC (rev 
9362)
+++ trunk/source/rpc_server/srv_eventlog_nt.c   2005-08-17 13:41:27 UTC (rev 
9363)
@@ -147,7 +147,7 @@
 
        for ( /* nothing */; *evtlog_list; evtlog_list++ ) {
                DEBUG(10,("eventlog_refresh_external_parameters: Refreshing 
=>[%s]\n",*evtlog_list));   
-               if (!eventlog_control_eventlog( *evtlog_list)) {
+               if (!control_eventlog_hook( *evtlog_list)) {
                        DEBUG(0,("eventlog_refresh_external_parameters: failed 
to refresh [%s]\n",*evtlog_list));
                }
        }  
@@ -244,7 +244,7 @@
       OUTPUT: nothing
 ********************************************************************/
 
-BOOL eventlog_control_eventlog(const char *evtlogname)
+BOOL control_eventlog_hook(const char *evtlogname)
 {
        char *cmd = lp_eventlog_control_cmd();
        pstring command;
@@ -255,7 +255,7 @@
        uint32 uiMaxSize;
 
        if(cmd == NULL || strlen(cmd) == 0) {
-               DEBUG(0, ("eventlog_control_eventlog: Must define an \"eventlog 
control command\" entry in the config.\n"));
+               DEBUG(0, ("control_eventlog_hook: Must define an \"eventlog 
control command\" entry in the config.\n"));
                return False;
        }
 
@@ -266,12 +266,12 @@
        pstrcpy(v_name,"Retention");
 
        if (!read_evtlog_uint32_reg_value(evtlogname, v_name, &uiRetention)) {
-               DEBUG(0, ("eventlog_control_eventlog: Warning - can't read 
Retention for eventlog %s, using default.\n",evtlogname));
+               DEBUG(0, ("control_eventlog_hook: Warning - can't read 
Retention for eventlog %s, using default.\n",evtlogname));
        }
 
        pstrcpy(v_name,"MaxSize");
        if (!read_evtlog_uint32_reg_value(evtlogname, v_name, &uiMaxSize)) {
-               DEBUG(0, ("eventlog_control_eventlog: Warning - can't read 
MaxSize for eventlog %s, using default.\n",evtlogname));
+               DEBUG(0, ("control_eventlog_hook: Warning - can't read MaxSize 
for eventlog %s, using default.\n",evtlogname));
        }
 
        memset(command, 0, sizeof(command));
@@ -281,12 +281,12 @@
                 uiRetention,
                 uiMaxSize);
 
-       DEBUG(10, ("eventlog_control_eventlog: Running [%s]\n", command));
+       DEBUG(10, ("control_eventlog_hook: Running [%s]\n", command));
        ret = smbrun(command, &fd);
        DEBUGADD(10, ("returned [%d]\n", ret));
 
        if(ret != 0) {
-               DEBUG(10, ("eventlog_control_eventlog: Command returned  
[%d]\n", ret));
+               DEBUG(10, ("control_eventlog_hook: Command returned  [%d]\n", 
ret));
                if(fd != -1) {
                        close(fd);
                }
@@ -294,7 +294,7 @@
        }
 
        close(fd);
-       return False;
+       return True;
 }
 
 

Reply via email to