[CRIU] [PATCH 14/16] sk-unix: Use add_post_prepare_cb_once helper
Cyrill Gorcunov
gorcunov at openvz.org
Fri Dec 9 09:17:14 PST 2016
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/sk-unix.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index aa990ee74c71..802a66db20b6 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1351,16 +1351,12 @@ static int resolve_unix_peers(void *unused);
static int collect_one_unixsk(void *o, ProtobufCMessage *base, struct cr_img *i)
{
struct unix_sk_info *ui = o;
- static bool post_queued = false;
ui->ue = pb_msg(base, UnixSkEntry);
ui->name_dir = (void *)ui->ue->name_dir;
- if (ui->ue->peer && !post_queued) {
- post_queued = true;
- if (add_post_prepare_cb(resolve_unix_peers, NULL))
- return -1;
- }
+ if (ui->ue->peer && add_post_prepare_cb_once(resolve_unix_peers, NULL))
+ return -1;
if (ui->ue->name.len) {
if (ui->ue->name.len > UNIX_PATH_MAX) {
--
2.7.4
More information about the CRIU
mailing list