Преглед изворни кода

change message source to use conn_info field instead of fd.
Also removed a few unneeded calls which were moved to the
amf.c file.

(Logical change 1.24)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@65 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake пре 21 година
родитељ
комит
405795d134
1 измењених фајлова са 10 додато и 13 уклоњено
  1. 10 13
      include/ais_msg.h

+ 10 - 13
include/ais_msg.h

@@ -38,18 +38,15 @@
 #include "ais_types.h"
 
 enum req_amf_response_interfaces {
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFHEALTHCHECKCALLBACK		= 0x10000000,
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFREADINESSSTATESETCALLBACK = 0x20000000,
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFCOMPONENTTERMINATECALLBACK = 0x30000000,
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFCSISETCALLBACK			= 0x40000000,
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFCSIREMOVECALLBACK			= 0x50000000,
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFEXTERNALCOMPONENTRESTARTCALLBACK = 0x60000000,
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFEXTERNALCOMPONENTCONTROLCALLBACK = 0x70000000,
-	MESSAGE_REQ_AMF_RESPONSE_SAAMFPENDINGOPERATIONCONFIRMCALLBACK = 0x80000000
-};
-#define req_amf_response_get_interface(a) (a & 0xf0000000)
-#define req_amf_response_get_connection(a) (a & 0x0fffffff)
-#define req_amf_response_set(interface,connection) (interface | connection)
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFHEALTHCHECKCALLBACK = 1,
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFREADINESSSTATESETCALLBACK,
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFCOMPONENTTERMINATECALLBACK,
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFCSISETCALLBACK,
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFCSIREMOVECALLBACK,
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFEXTERNALCOMPONENTRESTARTCALLBACK,
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFEXTERNALCOMPONENTCONTROLCALLBACK,
+	MESSAGE_REQ_AMF_RESPONSE_SAAMFPENDINGOPERATIONCONFIRMCALLBACK
+};
 
 enum req_init_types {
 	MESSAGE_REQ_CLM_INIT,
@@ -185,7 +182,7 @@ struct message_header {
 };
 
 struct message_source {
-	int fd;
+	struct conn_info *conn_info;
 	struct in_addr in_addr;
 };