Blame SOURCES/xinetd-2.3.14-instances.patch

76ef8a
--- xinetd-2.3.14/xinetd/access.c	2005-10-05 19:15:33.000000000 +0200
76ef8a
+++ xinetd-2.3.14-mod/xinetd/access.c	2012-03-05 14:54:30.935416926 +0100
76ef8a
@@ -73,6 +73,7 @@ static void cps_service_restart(void)
76ef8a
    unsigned int i;
76ef8a
    time_t nowtime;
76ef8a
    const char *func = "cps_service_restart";
76ef8a
+   int rs;
76ef8a
 
76ef8a
    nowtime = time(NULL);
76ef8a
    for( i=0; i < pset_count( SERVICES(ps) ); i++ ) {
76ef8a
@@ -84,8 +85,11 @@ static void cps_service_restart(void)
76ef8a
       if( SVC_STATE(sp) == SVC_DISABLED ) {
76ef8a
          scp = SVC_CONF( sp );
76ef8a
          if ( SC_TIME_REENABLE(scp) <= nowtime ) {
76ef8a
+            rs = SVC_RUNNING_SERVERS(sp);
76ef8a
             /* re-enable the service */
76ef8a
             if( svc_activate(sp) == OK ) {
76ef8a
+               /* remember running servers after restart */
76ef8a
+               SVC_RUNNING_SERVERS(sp) = rs;
76ef8a
                msg(LOG_ERR, func,
76ef8a
                "Activating service %s", SC_NAME(scp));
76ef8a
             } else {