/[monit]/monit/util.c
ViewVC logotype

Diff of /monit/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.155 by hauk, Wed Mar 23 23:37:49 2005 UTC revision 1.156 by martinp, Sun Apr 10 21:13:37 2005 UTC
# Line 1606  int Util_evalQExpression(int operator, i Line 1606  int Util_evalQExpression(int operator, i
1606    
1607    
1608  /*  /*
1609     * This will enable service monitoring in the case that it was disabled
1610     * @param s A Service_T object
1611     */
1612    void Util_monitorSet(Service_T s) {
1613    
1614      ASSERT(s);
1615    
1616      if(s->monitor == MONITOR_NOT) {
1617        s->monitor= MONITOR_INIT;
1618        DEBUG("Monitoring enabled -- service %s\n", s->name);
1619      }
1620    }
1621    
1622    
1623    /*
1624   * This will disable service monitoring in the case that it is enabled   * This will disable service monitoring in the case that it is enabled
1625   * @param s A Service_T object   * @param s A Service_T object
1626   */   */
# Line 1613  void Util_monitorUnset(Service_T s) { Line 1628  void Util_monitorUnset(Service_T s) {
1628    
1629    ASSERT(s);    ASSERT(s);
1630    
1631    s->monitor= MONITOR_NOT;    if(s->monitor != MONITOR_NOT)
1632    s->nstart= 0;    {
1633    s->ncycle= 0;      s->monitor= MONITOR_NOT;
1634    Util_resetInfo(s);      s->nstart= 0;
1635    DEBUG("Monitoring disabled -- service %s\n", s->name);      s->ncycle= 0;
1636        Util_resetInfo(s);
1637        DEBUG("Monitoring disabled -- service %s\n", s->name);
1638      }
1639  }  }
1640    
1641    

Legend:
Removed from v.1.155  
changed lines
  Added in v.1.156

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26