Make process_srv_queue() return the number of streams unqueued, as
pendconn_grab_from_px() did, as that number is used by
srv_update_status() to generate logs.
This should be backported up to 2.6 with
111ea83ed4e13ac3ab028ed5e95201a1b4aa82b8
struct pendconn *pendconn_add(struct stream *strm);
int pendconn_dequeue(struct stream *strm);
-void process_srv_queue(struct server *s);
+int process_srv_queue(struct server *s);
unsigned int srv_dynamic_maxconn(const struct server *s);
int pendconn_redistribute(struct server *s);
void pendconn_unlink(struct pendconn *p);
/* Manages a server's connection queue. This function will try to dequeue as
* many pending streams as possible, and wake them up.
*/
-void process_srv_queue(struct server *s)
+int process_srv_queue(struct server *s)
{
struct server *ref = s->track ? s->track : s;
struct proxy *p = s->proxy;
if (p->lbprm.server_take_conn)
p->lbprm.server_take_conn(s);
}
+ return done;
}
/* Adds the stream <strm> to the pending connection queue of server <strm>->srv
/* check if we can handle some connections queued.
* We will take as many as we can handle.
*/
- process_srv_queue(s);
+ xferred = process_srv_queue(s);
tmptrash = alloc_trash_chunk();
if (tmptrash) {
/* check if we can handle some connections queued.
* We will take as many as we can handle.
*/
- process_srv_queue(s);
+ xferred = process_srv_queue(s);
}
else if (s->next_admin & SRV_ADMF_MAINT) {
/* remaining in maintenance mode, let's inform precisely about the