Blame SOURCES/xinetd-2.3.14-instances.patch

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