[CRIU] [PATCH] service: use send_criu_pre_dump_resp() in pre_dump_using_req()

Ruslan Kuprieiev kupruser at gmail.com
Thu Feb 20 23:37:51 PST 2014


Currently we have a bug, service sends resp of type PRE_DUMP
instead of DUMP. So lets introduce send_criu_pre_dump_resp() and
use it.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 cr-service.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/cr-service.c b/cr-service.c
index bfb856f..70b25ee 100644
--- a/cr-service.c
+++ b/cr-service.c
@@ -100,6 +100,16 @@ int send_criu_dump_resp(int socket_fd, bool success, bool restored)
 	return send_criu_msg(socket_fd, &msg);
 }
 
+int send_criu_pre_dump_resp(int socket_fd, bool success)
+{
+	CriuResp msg = CRIU_RESP__INIT;
+
+	msg.type = CRIU_REQ_TYPE__PRE_DUMP;
+	msg.success = success;
+
+	return send_criu_msg(socket_fd, &msg);
+}
+
 int send_criu_restore_resp(int socket_fd, bool success, int pid)
 {
 	CriuResp msg = CRIU_RESP__INIT;
@@ -381,7 +391,7 @@ cout:
 
 	success = true;
 out:
-	if (send_criu_dump_resp(sk, success, false) == -1) {
+	if (send_criu_pre_dump_resp(sk, success) == -1) {
 		pr_perror("Can't send pre-dump resp");
 		success = false;
 	}
-- 
1.8.3.2



More information about the CRIU mailing list