/[monit]/monit/protocols/protocol.c
ViewVC logotype

Diff of /monit/protocols/protocol.c

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

revision 1.18 by martinp, Thu Jan 29 17:52:12 2004 UTC revision 1.19 by hauk, Sun Dec 12 23:45:09 2004 UTC
# Line 48  static Protocol_T myldap3= NULL; Line 48  static Protocol_T myldap3= NULL;
48  static Protocol_T myrdate= NULL;  static Protocol_T myrdate= NULL;
49  static Protocol_T myrsync= NULL;  static Protocol_T myrsync= NULL;
50  static Protocol_T mygeneric= NULL;  static Protocol_T mygeneric= NULL;
51    static Protocol_T myapache_status= NULL;
52    
53    
54  /**  /**
# Line 81  void gc_protocols() { Line 82  void gc_protocols() {
82    FREE(myrdate);      FREE(myrdate);  
83    FREE(myrsync);      FREE(myrsync);  
84    FREE(mygeneric);    FREE(mygeneric);
85      FREE(myapache_status);
86    
87  }  }
88    
89    
90  void *create_default() {  void *create_default() {
   
91    if(mydefault == NULL) {    if(mydefault == NULL) {
92      NEW(mydefault);      NEW(mydefault);
93      mydefault->name= "DEFAULT";      mydefault->name= "DEFAULT";
94      mydefault->check= check_default;      mydefault->check= check_default;
95    }    }
   
96    return mydefault;    return mydefault;
   
97  }  }
98    
99    
100  void *create_http() {  void *create_http() {
   
101    if(myhttp == NULL) {    if(myhttp == NULL) {
102      NEW(myhttp);      NEW(myhttp);
103      myhttp->name= "HTTP";      myhttp->name= "HTTP";
104      myhttp->check= check_http;      myhttp->check= check_http;
105    }    }
   
106    return myhttp;    return myhttp;
107    }
108    
109    
110    void *create_apache_status() {
111      if(myapache_status == NULL) {
112        NEW(myapache_status);
113        myapache_status->name= "APACHESTATUS";
114        myapache_status->check= check_apache_status;
115      }
116      return myapache_status;
117  }  }
118    
119    
120  void *create_ftp() {  void *create_ftp() {
   
121    if(myftp == NULL) {    if(myftp == NULL) {
122      NEW(myftp);      NEW(myftp);
123      myftp->name= "FTP";      myftp->name= "FTP";
124      myftp->check= check_ftp;      myftp->check= check_ftp;
125    }    }
   
126    return myftp;    return myftp;
   
127  }  }
128    
129    
130  void *create_smtp() {  void *create_smtp() {
   
131    if(mysmtp == NULL) {    if(mysmtp == NULL) {
132      NEW(mysmtp);      NEW(mysmtp);
133      mysmtp->name= "SMTP";      mysmtp->name= "SMTP";
134      mysmtp->check= check_smtp;      mysmtp->check= check_smtp;
135    }    }
   
136    return mysmtp;    return mysmtp;
   
137  }  }
138    
139    
140  void *create_pop() {  void *create_pop() {
   
141    if(mypop == NULL) {    if(mypop == NULL) {
142      NEW(mypop);      NEW(mypop);
143      mypop->name= "POP";      mypop->name= "POP";
144      mypop->check= check_pop;      mypop->check= check_pop;
145    }    }
   
146    return mypop;    return mypop;
   
147  }  }
148    
149    
150  void *create_imap() {  void *create_imap() {
   
151    if(myimap == NULL) {    if(myimap == NULL) {
152      NEW(myimap);      NEW(myimap);
153      myimap->name= "IMAP";      myimap->name= "IMAP";
154      myimap->check= check_imap;      myimap->check= check_imap;
155    }    }
   
156    return myimap;    return myimap;
   
157  }  }
158    
159    
160  void *create_nntp() {  void *create_nntp() {
   
161    if(mynntp == NULL) {    if(mynntp == NULL) {
162      NEW(mynntp);      NEW(mynntp);
163      mynntp->name= "NNTP";      mynntp->name= "NNTP";
164      mynntp->check= check_nntp;      mynntp->check= check_nntp;
165    }    }
   
166    return mynntp;    return mynntp;
   
167  }  }
168    
169    
170  void *create_ssh() {  void *create_ssh() {
     
171    if(myssh == NULL) {    if(myssh == NULL) {
172      NEW(myssh);      NEW(myssh);
173      myssh->name= "SSH";      myssh->name= "SSH";
174      myssh->check= check_ssh;      myssh->check= check_ssh;
175    }    }
     
176    return myssh;    return myssh;
   
177  }  }
178    
179    
180  void *create_dwp() {  void *create_dwp() {
     
181    if(mydwp == NULL) {    if(mydwp == NULL) {
182      NEW(mydwp);      NEW(mydwp);
183      mydwp->name= "DWP";      mydwp->name= "DWP";
184      mydwp->check= check_dwp;      mydwp->check= check_dwp;
185    }    }
     
186    return mydwp;    return mydwp;
   
187  }  }
188    
189    
190  void *create_ldap2() {  void *create_ldap2() {
     
191    if(myldap2 == NULL) {    if(myldap2 == NULL) {
192      NEW(myldap2);      NEW(myldap2);
193      myldap2->name= "LDAP2";      myldap2->name= "LDAP2";
194      myldap2->check= check_ldap2;      myldap2->check= check_ldap2;
195    }    }
     
196    return myldap2;    return myldap2;
   
197  }  }
198    
199    
200  void *create_ldap3() {  void *create_ldap3() {
     
201    if(myldap3 == NULL) {    if(myldap3 == NULL) {
202      NEW(myldap3);      NEW(myldap3);
203      myldap3->name= "LDAP3";      myldap3->name= "LDAP3";
204      myldap3->check= check_ldap3;      myldap3->check= check_ldap3;
205    }    }
     
206    return myldap3;    return myldap3;
   
207  }  }
208    
209    
210  void *create_rdate() {  void *create_rdate() {
     
211    if(myrdate == NULL) {    if(myrdate == NULL) {
212      NEW(myrdate);      NEW(myrdate);
213      myrdate->name= "RDATE";      myrdate->name= "RDATE";
214      myrdate->check= check_rdate;      myrdate->check= check_rdate;
215    }    }
     
216    return myrdate;    return myrdate;
     
217  }  }
218    
219    
220  void *create_rsync() {  void *create_rsync() {
     
221    if(myrsync == NULL) {    if(myrsync == NULL) {
222      NEW(myrsync);      NEW(myrsync);
223      myrsync->name= "RSYNC";      myrsync->name= "RSYNC";
224      myrsync->check= check_rsync;      myrsync->check= check_rsync;
225    }    }
     
226    return myrsync;    return myrsync;
     
227  }  }
228    
229  void *create_generic() {  void *create_generic() {
     
230    if(myrsync == NULL) {    if(myrsync == NULL) {
231      NEW(myrsync);      NEW(myrsync);
232      myrsync->name= "generic";      myrsync->name= "generic";
233      myrsync->check= check_generic;      myrsync->check= check_generic;
234    }    }
     
235    return myrsync;    return myrsync;
     
236  }  }
237    
238    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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