unsigned int pp_opts; /* proxy protocol options (SRV_PP_*) */
struct mt_list global_list; /* attach point in the global servers_list */
struct server *next;
- struct mt_list prev_deleted; /* deleted servers with 'next' ptr pointing to us */
int cklen; /* the len of the cookie, to speed up checks */
int rdr_len; /* the length of the redirection prefix */
char *cookie; /* the id set in the cookie */
LIST_INIT(&srv->srv_rec_item);
LIST_INIT(&srv->ip_rec_item);
LIST_INIT(&srv->pp_tlvs);
- MT_LIST_INIT(&srv->prev_deleted);
event_hdl_sub_list_init(&srv->e_subs);
srv->rid = 0; /* rid defaults to 0 */
guid_remove(&srv->guid);
- /* make sure we are removed from our 'next->prev_deleted' list
- * This doesn't require full thread isolation as we're using mt lists
- * However this could easily be turned into regular list if required
- * (with the proper use of thread isolation)
- */
- MT_LIST_DELETE(&srv->prev_deleted);
-
task_destroy(srv->warmup);
task_destroy(srv->srvrq_check);
{
struct proxy *be;
struct server *srv;
- struct server *prev_del;
struct ist be_name, sv_name;
struct mt_list back;
struct sess_priv_conns *sess_conns = NULL;
*/
_srv_detach(srv);
- /* Some deleted servers could still point to us using their 'next',
- * migrate them as needed
- */
- MT_LIST_FOR_EACH_ENTRY_LOCKED(prev_del, &srv->prev_deleted, prev_deleted, back) {
- /* update its 'next' ptr */
- prev_del->next = srv->next;
- if (srv->next) {
- /* now it is our 'next' responsibility */
- MT_LIST_APPEND(&srv->next->prev_deleted, &prev_del->prev_deleted);
- }
- else
- mt_list_unlock_self(&prev_del->prev_deleted);
- /* unlink from our list */
- prev_del = NULL;
- }
-
- /* we ourselves need to inform our 'next' that we will still point it */
- if (srv->next)
- MT_LIST_APPEND(&srv->next->prev_deleted, &srv->prev_deleted);
-
/* remove srv from addr_node tree */
eb32_delete(&srv->conf.id);
ebpt_delete(&srv->conf.name);