Răsfoiți Sursa

Add activate poll message.

(Logical change 1.21)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@57 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 21 ani în urmă
părinte
comite
88996cbb21
2 a modificat fișierele cu 27 adăugiri și 9 ștergeri
  1. 8 8
      exec/amf.c
  2. 19 1
      exec/ckpt.c

+ 8 - 8
exec/amf.c

@@ -230,7 +230,7 @@ static int message_handler_req_exec_amf_hastateset (int fd, void *message);
 
 static int message_handler_req_amf_init (int fd, void *message);
 
-static int message_handler_req_amf_activatepoll (int fd, void *message);
+static int message_handler_req_lib_activatepoll (int fd, void *message);
 
 static int message_handler_req_amf_componentregister (int fd, void *message);
 
@@ -255,7 +255,7 @@ static int message_handler_req_amf_response (int fd, void *message);
 static int message_handler_req_amf_componentcapabilitymodelget (int fd, void *message);
 
 int (*amf_libais_handler_fns[]) (int fd, void *) = {
-	message_handler_req_amf_activatepoll,
+	message_handler_req_lib_activatepoll,
 	message_handler_req_amf_componentregister,
 	message_handler_req_amf_componentunregister,
 	message_handler_req_amf_readinessstateget,
@@ -1817,14 +1817,14 @@ static int message_handler_req_amf_init (int fd, void *message)
 	return (-1);
 }
 
-static int message_handler_req_amf_activatepoll (int fd, void *message)
+static int message_handler_req_lib_activatepoll (int fd, void *message)
 {
-	struct res_amf_activatepoll res_amf_activatepoll;
+	struct res_lib_activatepoll res_lib_activatepoll;
 
-	res_amf_activatepoll.header.magic = MESSAGE_MAGIC;
-	res_amf_activatepoll.header.size = sizeof (struct res_amf_activatepoll);
-	res_amf_activatepoll.header.id = MESSAGE_RES_AMF_ACTIVATEPOLL;
-	libais_send_response (fd, &res_amf_activatepoll, sizeof (struct res_amf_activatepoll));
+	res_lib_activatepoll.header.magic = MESSAGE_MAGIC;
+	res_lib_activatepoll.header.size = sizeof (struct res_lib_activatepoll);
+	res_lib_activatepoll.header.id = MESSAGE_RES_LIB_ACTIVATEPOLL;
+	libais_send_response (fd, &res_lib_activatepoll, sizeof (struct res_lib_activatepoll));
 
 	return (0);
 }

+ 19 - 1
exec/ckpt.c

@@ -64,6 +64,8 @@ DECLARE_LIST_INIT(checkpointIteratorListHead);
 static int ckptCheckpointApiFinalize (int fd);
 static int ckptSectionIteratorApiFinalize (int fd);
 
+static int message_handler_req_lib_activatepoll (int fd, void *message);
+
 static int message_handler_req_exec_ckpt_checkpointopen (int fd, void *message);
 
 static int message_handler_req_exec_ckpt_checkpointclose (int fd, void *message);
@@ -130,10 +132,11 @@ static int ckptConfChg (
 }
 
 int (*ckpt_libais_handler_fns[]) (int fd, void *) = {
+	message_handler_req_lib_activatepoll
 };
 
 /*
- * TODO multinode not yet implemented
+ * TODO
  */
 int (*ckpt_aisexec_handler_fns[]) (int fd, void *) = {
 };
@@ -153,6 +156,7 @@ struct service_handler ckpt_service_handler = {
 };
 
 static int (*ckpt_checkpoint_libais_handler_fns[]) (int fd, void *) = {
+	message_handler_req_lib_activatepoll,
 	message_handler_req_lib_ckpt_checkpointopen,
 	message_handler_req_lib_ckpt_checkpointopenasync,
 	message_handler_req_lib_ckpt_checkpointunlink,
@@ -194,6 +198,7 @@ struct service_handler ckpt_checkpoint_service_handler = {
 };
 
 static int (*ckpt_sectioniterator_libais_handler_fns[]) (int fd, void *) = {
+	message_handler_req_lib_activatepoll,
     message_handler_req_lib_ckpt_sectioniteratorinitialize,
     message_handler_req_lib_ckpt_sectioniteratornext
 };
@@ -310,6 +315,19 @@ static int ckptSectionIteratorApiFinalize (int fd) {
 	return (0);
 }
 
+static int message_handler_req_lib_activatepoll (int fd, void *message)
+{
+	struct res_lib_activatepoll res_lib_activatepoll;
+
+	res_lib_activatepoll.header.magic = MESSAGE_MAGIC;
+	res_lib_activatepoll.header.size = sizeof (struct res_lib_activatepoll);
+	res_lib_activatepoll.header.id = MESSAGE_RES_LIB_ACTIVATEPOLL;
+	libais_send_response (fd, &res_lib_activatepoll,
+		sizeof (struct res_lib_activatepoll));
+
+	return (0);
+}
+
 static int message_handler_req_exec_ckpt_checkpointopen (int fd, void *message)
 {
 	struct req_exec_ckpt_checkpointopen *req_exec_ckpt_checkpointopen = (struct req_exec_ckpt_checkpointopen *)message;