typedef struct _Waiter Waiter;
static Eina_List **requests = NULL;
+static Eina_List *processing = NULL;
static void
_request_waiter_add(Font_Request *req, Client *client, unsigned int rid)
Eina_List *l;
req = NULL;
- EINA_LIST_FOREACH(requests[type], l, r)
+
+ EINA_LIST_FOREACH(processing, l, r)
{
- if (r->data != data)
+ if (r->data == data)
continue;
req = r;
if (!req)
{
+ EINA_LIST_FOREACH(requests[type], l, r)
+ {
+ if (r->data != data)
+ continue;
+
+ req = r;
+ break;
+ }
+ }
+
+ if (!req)
+ {
DBG("Add request for rid: %d", rid);
req = malloc(sizeof(*req));
req->data = data;
}
req->funcs->msg_free(req->msg);
+ processing = eina_list_remove(processing, req);
free(req);
}
// FIXME: We shouldn't free this message directly, it must be freed by a
// callback.
free(msg);
+ processing = eina_list_remove(processing, req);
free(req);
sw->data = NULL;
if (req)
_cserve2_request_failed(req, CSERVE2_LOADER_DIED);
+ processing = eina_list_remove(processing, req);
*working = eina_list_remove(*working, sw);
free(sw);
}
Font_Request *req = eina_list_data_get(requests[rtype]);
requests[rtype] = eina_list_remove_list(requests[rtype],
requests[rtype]);
+ processing = eina_list_append(processing, req);
if (!(*idle))
sw = _slave_for_request_create(type);