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

Diff of /monit/util.c

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

revision 1.167 by martinp, Sat Oct 29 23:44:16 2005 UTC revision 1.168 by martinp, Wed Nov 2 14:06:10 2005 UTC
# Line 738  void Util_printService(Service_T s) { Line 738  void Util_printService(Service_T s) {
738    
739        if(n->family == AF_INET) {        if(n->family == AF_INET) {
740                    
741             printf(" %-20s = if failed %s:%d%s [protocol %s%s] with "             printf(" %-20s = if failed %s:%d%s [%s via %s] with "
742               "timeout %d seconds %s then %s else if passed %s then %s\n",               "timeout %d seconds %s then %s else if passed %s then %s\n",
743               "Port", n->hostname, n->port, n->request?n->request:"",               "Port", n->hostname, n->port, n->request?n->request:"",
744               n->protocol->name, n->SSL.use_ssl?" via SSL":"", n->timeout,               n->protocol->name, Util_portTypeDescription(n),
745                 n->timeout,
746               ratio1, actionnames[a->failed->id],               ratio1, actionnames[a->failed->id],
747               ratio2, actionnames[a->passed->id]);               ratio2, actionnames[a->passed->id]);
748                        
# Line 1757  char *Util_getEventratio(Action_T action Line 1758  char *Util_getEventratio(Action_T action
1758  }  }
1759    
1760    
1761    /**
1762     * Print port type description
1763     * @param p A port structure
1764     * @return the socket type description
1765     */
1766    char *Util_portTypeDescription(Port_T p) {
1767      switch(p->type) {
1768        case SOCK_STREAM:
1769          return p->SSL.use_ssl?"TCPSSL":"TCP";
1770        case SOCK_DGRAM:
1771          return "UDP";
1772        default:
1773          return "UNKNOWN";
1774      }
1775    }
1776    
1777    
1778  /* ----------------------------------------------------------------- Private */  /* ----------------------------------------------------------------- Private */
1779    
1780    

Legend:
Removed from v.1.167  
changed lines
  Added in v.1.168

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