/[monit]/monit/p.y
ViewVC logotype

Diff of /monit/p.y

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

revision 1.16 by hauk, Fri Sep 13 01:32:26 2002 UTC revision 1.17 by chopp, Wed Sep 25 14:54:48 2002 UTC
# Line 67  Line 67 
67  #include "engine.h"  #include "engine.h"
68  #include "alert.h"  #include "alert.h"
69  #include "monit_process.h"  #include "monit_process.h"
70    #include "ssl.h"
71    
72        
73    struct IHavePrecedence {    struct IHavePrecedence {
# Line 91  Line 92 
92      int  port;      int  port;
93      int  type;      int  type;
94      int  family;      int  family;
95        int  ssl;
96      char *request;      char *request;
97      char *pathname;      char *pathname;
98      Protocol_T protocol;      Protocol_T protocol;
# Line 121  Line 123 
123    static struct IHavePrecedence ihp= { FALSE, FALSE };    static struct IHavePrecedence ihp= { FALSE, FALSE };
124    static struct MailFilter mtf= { NULL, NULL, NULL, FALSE, FALSE, FALSE,    static struct MailFilter mtf= { NULL, NULL, NULL, FALSE, FALSE, FALSE,
125                                    FALSE, FALSE };                                    FALSE, FALSE };
126    static struct PortSet portset= { -1, NULL, 0, SOCK_STREAM, AF_INET, NULL,    static struct PortSet portset= { -1, NULL, 0, SOCK_STREAM, AF_INET, FALSE,
127                                     NULL, NULL };                                     NULL, NULL, NULL };
128    static struct ResourceSet resourceset= { 0, 0, RESOURCE_OPERATOR_GREATER,    static struct ResourceSet resourceset= { 0, 0, RESOURCE_OPERATOR_GREATER,
129                                             1, RESOURCE_ACTION_ALERT };                                             1, RESOURCE_ACTION_ALERT };
130    
# Line 161  Line 163 
163    
164  %token SET LOGFILE DAEMON SYSLOG MAILSERVER HTTPD ALLOW ADDRESS INIT  %token SET LOGFILE DAEMON SYSLOG MAILSERVER HTTPD ALLOW ADDRESS INIT
165  %token CHECK PIDFILE START STOP  %token CHECK PIDFILE START STOP
166  %token HOST PORT TYPE UDP TCP PROTOCOL  %token HOST PORT TYPE UDP TCP TCPSSL PROTOCOL
167  %token ALERT MAILFORMAT UNIXSOCKET  %token ALERT MAILFORMAT UNIXSOCKET
168  %token TIMEOUT RESTART CHECKSUM EXPECT EVERY  %token TIMEOUT RESTART CHECKSUM EXPECT EVERY
169  %token DEFAULT HTTP FTP SMTP POP IMAP NNTP  %token DEFAULT HTTP FTP SMTP POP IMAP NNTP
# Line 339  unixsocket      : UNIXSOCKET PATH { Line 341  unixsocket      : UNIXSOCKET PATH {
341    
342  type            : /* EMPTY */ { portset.type= SOCK_STREAM; }  type            : /* EMPTY */ { portset.type= SOCK_STREAM; }
343                  | TYPE TCP    { portset.type= SOCK_STREAM;  }                  | TYPE TCP    { portset.type= SOCK_STREAM;  }
344                    | TYPE TCPSSL { portset.type= SOCK_STREAM;
345                                    portset.ssl= TRUE; }
346                  | TYPE UDP    { portset.type= SOCK_DGRAM; }                  | TYPE UDP    { portset.type= SOCK_DGRAM; }
347                  ;                  ;
348    
# Line 704  static void addport(struct PortSet *pp) Line 708  static void addport(struct PortSet *pp)
708      snprintf(address, STRLEN, "UNIX[%s]", pp->pathname);      snprintf(address, STRLEN, "UNIX[%s]", pp->pathname);
709    }    }
710    
711      if ( pp->ssl == TRUE ) {
712    
713        p->ssl= new_ssl_connection();
714    
715      } else {
716    
717        p->ssl= NULL;
718    
719      }
720    
721    p->address= xstrdup(address);    p->address= xstrdup(address);
722        
723    p->next= current->portlist;    p->next= current->portlist;
# Line 946  static void reset_portset() { Line 960  static void reset_portset() {
960    portset.port= 0;    portset.port= 0;
961    portset.type= SOCK_STREAM;    portset.type= SOCK_STREAM;
962    portset.family= AF_INET;    portset.family= AF_INET;
963      portset.ssl= FALSE;
964    portset.request= NULL;    portset.request= NULL;
965    portset.protocol= NULL;    portset.protocol= NULL;
966    portset.pathname= NULL;    portset.pathname= NULL;

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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