network: introduce link_requeue_request()
This commit is contained in:
@@ -216,6 +216,23 @@ int link_queue_request_full(
|
||||
process, counter, netlink_handler, ret);
|
||||
}
|
||||
|
||||
int link_requeue_request(Link *link, Request *req, void *userdata, Request **ret) {
|
||||
assert(link);
|
||||
assert(req);
|
||||
|
||||
return link_queue_request_full(
|
||||
link,
|
||||
req->type,
|
||||
userdata,
|
||||
req->free_func,
|
||||
req->hash_func,
|
||||
req->compare_func,
|
||||
req->process,
|
||||
req->counter,
|
||||
req->netlink_handler,
|
||||
ret);
|
||||
}
|
||||
|
||||
int manager_process_requests(Manager *manager) {
|
||||
Request *req;
|
||||
int r;
|
||||
|
||||
@@ -107,6 +107,8 @@ int link_queue_request_full(
|
||||
request_netlink_handler_t netlink_handler,
|
||||
Request **ret);
|
||||
|
||||
int link_requeue_request(Link *link, Request *req, void *userdata, Request **ret);
|
||||
|
||||
static inline int link_queue_request(
|
||||
Link *link,
|
||||
RequestType type,
|
||||
|
||||
@@ -780,16 +780,7 @@ static int route_requeue_request(Request *req, Link *link, const Route *route) {
|
||||
request_detach(req);
|
||||
|
||||
/* Request the route with the adjusted Route object combined with the same other parameters. */
|
||||
r = link_queue_request_full(link,
|
||||
req->type,
|
||||
tmp,
|
||||
req->free_func,
|
||||
req->hash_func,
|
||||
req->compare_func,
|
||||
req->process,
|
||||
req->counter,
|
||||
req->netlink_handler,
|
||||
NULL);
|
||||
r = link_requeue_request(link, req, tmp, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0)
|
||||
|
||||
Reference in New Issue
Block a user