36 |
static Protocol_T mypop= NULL; |
static Protocol_T mypop= NULL; |
37 |
static Protocol_T myimap= NULL; |
static Protocol_T myimap= NULL; |
38 |
static Protocol_T mynntp= NULL; |
static Protocol_T mynntp= NULL; |
39 |
|
static Protocol_T myssh= NULL; |
40 |
|
|
41 |
|
|
42 |
/** |
/** |
63 |
free(mypop); mypop= NULL; |
free(mypop); mypop= NULL; |
64 |
free(myimap); myimap= NULL; |
free(myimap); myimap= NULL; |
65 |
free(mynntp); mynntp= NULL; |
free(mynntp); mynntp= NULL; |
66 |
|
free(myssh); myssh= NULL; |
67 |
|
|
68 |
} |
} |
69 |
|
|
70 |
|
|
71 |
void *create_default() { |
void *create_default() { |
72 |
|
|
73 |
if ( mydefault == NULL ) { |
if(mydefault == NULL) { |
74 |
static const char *name= "DEFAULT"; |
static const char *name= "DEFAULT"; |
75 |
mydefault= NEW(mydefault); |
mydefault= NEW(mydefault); |
76 |
mydefault->name= name; |
mydefault->name= name; |
84 |
|
|
85 |
void *create_http() { |
void *create_http() { |
86 |
|
|
87 |
if ( myhttp == NULL ) { |
if(myhttp == NULL) { |
88 |
static const char *name= "HTTP"; |
static const char *name= "HTTP"; |
89 |
myhttp= NEW(myhttp); |
myhttp= NEW(myhttp); |
90 |
myhttp->name= name; |
myhttp->name= name; |
98 |
|
|
99 |
void *create_ftp() { |
void *create_ftp() { |
100 |
|
|
101 |
if ( myftp == NULL ) { |
if(myftp == NULL) { |
102 |
static const char *name= "FTP"; |
static const char *name= "FTP"; |
103 |
myftp= NEW(myftp); |
myftp= NEW(myftp); |
104 |
myftp->name= name; |
myftp->name= name; |
112 |
|
|
113 |
void *create_smtp() { |
void *create_smtp() { |
114 |
|
|
115 |
if ( mysmtp == NULL ) { |
if(mysmtp == NULL) { |
116 |
static const char *name= "SMTP"; |
static const char *name= "SMTP"; |
117 |
mysmtp= NEW(mysmtp); |
mysmtp= NEW(mysmtp); |
118 |
mysmtp->name= name; |
mysmtp->name= name; |
126 |
|
|
127 |
void *create_pop() { |
void *create_pop() { |
128 |
|
|
129 |
if ( mypop == NULL ) { |
if(mypop == NULL) { |
130 |
static const char *name= "POP"; |
static const char *name= "POP"; |
131 |
mypop= NEW(mypop); |
mypop= NEW(mypop); |
132 |
mypop->name= name; |
mypop->name= name; |
140 |
|
|
141 |
void *create_imap() { |
void *create_imap() { |
142 |
|
|
143 |
if ( myimap == NULL ) { |
if(myimap == NULL) { |
144 |
static const char *name= "IMAP"; |
static const char *name= "IMAP"; |
145 |
myimap= NEW(myimap); |
myimap= NEW(myimap); |
146 |
myimap->name= name; |
myimap->name= name; |
154 |
|
|
155 |
void *create_nntp() { |
void *create_nntp() { |
156 |
|
|
157 |
if ( mynntp == NULL ) { |
if(mynntp == NULL) { |
158 |
static const char *name= "NNTP"; |
static const char *name= "NNTP"; |
159 |
mynntp= NEW(mynntp); |
mynntp= NEW(mynntp); |
160 |
mynntp->name= name; |
mynntp->name= name; |
164 |
return mynntp; |
return mynntp; |
165 |
|
|
166 |
} |
} |
167 |
|
|
168 |
|
|
169 |
|
void *create_ssh() { |
170 |
|
|
171 |
|
if(myssh == NULL) { |
172 |
|
static const char *name= "SSH"; |
173 |
|
myssh= NEW(myssh); |
174 |
|
myssh->name= name; |
175 |
|
myssh->check= check_ssh; |
176 |
|
} |
177 |
|
|
178 |
|
return myssh; |
179 |
|
|
180 |
|
} |