Sfoglia il codice sorgente

Swap item in cpg_joinlist

This patch add swab of header->size so big endian architectures
works with LE list and vica versa.


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2384 fd59a12c-fef9-0310-b244-a6a79926bd2f
Jan Friesse 16 anni fa
parent
commit
7e745c7444
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      services/cpg.c

+ 1 - 1
services/cpg.c

@@ -624,7 +624,7 @@ static void exec_cpg_joinlist_endian_convert (void *msg_v)
 	coroipc_response_header_t *res = (coroipc_response_header_t *)msg;
 	coroipc_response_header_t *res = (coroipc_response_header_t *)msg;
 	struct join_list_entry *jle = (struct join_list_entry *)(msg + sizeof(coroipc_response_header_t));
 	struct join_list_entry *jle = (struct join_list_entry *)(msg + sizeof(coroipc_response_header_t));
 
 
-	/* XXX shouldn't mar_res_header be swabbed? */
+	swab_mar_int32_t (&res->size);
 
 
 	while ((const char*)jle < msg + res->size) {
 	while ((const char*)jle < msg + res->size) {
 		jle->pid = swab32(jle->pid);
 		jle->pid = swab32(jle->pid);