network: introduce link_requeue_request()

This commit is contained in:
Yu Watanabe
2024-03-15 02:28:48 +09:00
parent c91f8f90ba
commit 134fe8d274
3 changed files with 20 additions and 10 deletions
+17
View File
@@ -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;
+2
View File
@@ -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,
+1 -10
View File
@@ -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)