- Timestamp:
- Nov 25, 2012, 1:44:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_socket.c
r383 r421 165 165 #include "sh_utils.h" 166 166 167 167 /* The reload list stores information about 168 * reloads confirmed by clients (startup and/or 169 * runtime cinfiguration reloaded). 170 */ 168 171 struct reload_cmd { 169 172 char clt[SH_MAXMSGLEN]; … … 235 238 if (item->status_now != CLT_INACTIVE) 236 239 { 240 int flag = 0; 241 237 242 file = get_client_conf_file (item->hostname, &dummy); 238 243 … … 250 255 if (0 == sl_strcmp(new->clt, item->hostname)) 251 256 { 257 flag = 1; /* Client is in list already */ 258 252 259 #ifdef SH_DEBUG_SOCKET 253 260 fprintf(stderr, "%lu <> %lu\n", … … 266 273 new = new->next; 267 274 } 268 } 269 } 270 } 275 276 if (flag == 0) 277 { 278 /* client is active, but start message has been missed; reload 279 */ 280 sl_strlcpy(cmd.cmd, _("RELOAD"), SH_MAXMSGLEN); 281 sl_strlcpy(cmd.clt, item->hostname, SH_MAXMSGLEN); 282 sh_socket_add2list (&cmd); 283 284 /* Add the client to the reload list and set 285 * time to 0, since we don't know the startup time. 286 */ 287 sh_socket_add2reload (item->hostname); 288 new = reloadlist; 289 while (new) 290 { 291 if (0 == sl_strcmp(new->clt, item->hostname)) 292 { 293 new->cti = 0; 294 break; 295 } 296 new = new->next; 297 } 298 } 299 } /* if stat(file).. */ 300 } /* if !CLT_INACTIVE */ 301 } /* loop over clients */ 271 302 return; 272 303 }
Note:
See TracChangeset
for help on using the changeset viewer.