MAJOR: servers: propagate server status changes asynchronously.
In order to prepare multi-thread development, code was re-worked
to propagate changes asynchronoulsy.
Servers with pending status changes are registered in a list
and this one is processed and emptied only once 'run poll' loop.
Operational status changes are performed before administrative
status changes.
In a case of multiple operational status change or admin status
change in the same 'run poll' loop iteration, those changes are
merged to reach only the targeted status.
diff --git a/include/types/server.h b/include/types/server.h
index 75349d7..75054a0 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -299,6 +299,9 @@
int nb_high;
} tmpl_info;
struct dns_srvrq *srvrq; /* Pointer representing the DNS SRV requeest, if any */
+ struct list update_status; /* to attach to list of servers chnaging status */
+ char op_st_chg_reason[48]; /* operational status change's reason */
+ char adm_st_chg_cause[48]; /* adminstrative status change's cause */
};
/* Descriptor for a "server" keyword. The ->parse() function returns 0 in case of