Only in corosync-1.2.0/exec: cscope.out diff -ur corosync-1.2.0.orig//exec/totemip.c corosync-1.2.0/exec/totemip.c --- corosync-1.2.0.orig//exec/totemip.c 2009-12-08 01:25:45.000000000 +0100 +++ corosync-1.2.0/exec/totemip.c 2010-03-04 19:32:22.049615000 +0100 @@ -376,9 +376,6 @@ */ totemip_sockaddr_to_totemip_convert((struct sockaddr_storage *)sockaddr_in, boundto); boundto->nodeid = sockaddr_in->sin_addr.s_addr; -#if __BYTE_ORDER == __BIG_ENDIAN - boundto->nodeid = swab32 (boundto->nodeid); -#endif if (ioctl(id_fd, SIOCGLIFFLAGS, &lifreq[i]) < 0) { printf ("couldn't do ioctl\n"); @@ -609,9 +606,6 @@ if (ipaddr.family == AF_INET && ipaddr.nodeid == 0) { unsigned int nodeid = 0; memcpy (&nodeid, ipaddr.addr, sizeof (int)); -#if __BYTE_ORDER == __BIG_ENDIAN - nodeid = swab32 (nodeid); -#endif if (mask_high_bit) { nodeid &= 0x7FFFFFFF; } Only in corosync-1.2.0/exec: totemip.c.orig diff -ur corosync-1.2.0.orig//test/testcpg.c corosync-1.2.0/test/testcpg.c --- corosync-1.2.0.orig//test/testcpg.c 2009-09-20 08:04:02.000000000 +0200 +++ corosync-1.2.0/test/testcpg.c 2010-03-04 19:30:03.590982000 +0100 @@ -48,7 +48,6 @@ #include #include -#include static int quit = 0; static int show_ip = 0; @@ -62,24 +61,6 @@ } } -static char * node_pid_format(unsigned int nodeid,int pid) { - static char buffer[100]; - if (show_ip) { - struct in_addr saddr; -#if __BYTE_ORDER == __BIG_ENDIAN - saddr.s_addr = swab32(nodeid); -#else - saddr.s_addr = nodeid; -#endif - sprintf(buffer, "node/pid %s/%d", inet_ntoa(saddr),pid); - } - else { - sprintf(buffer, "node/pid %d/%d", nodeid, pid); - } - return buffer; -} - - static void DeliverCallback ( cpg_handle_t handle, const struct cpg_name *groupName, @@ -88,9 +69,18 @@ void *msg, size_t msg_len) { - printf("DeliverCallback: message (len=%lu)from %s: '%s'\n", - (unsigned long int) msg_len, node_pid_format(nodeid, pid), + if (show_ip) { + struct in_addr saddr; + saddr.s_addr = nodeid; + printf("DeliverCallback: message (len=%lu)from node/pid %s/%d: '%s'\n", + (unsigned long int) msg_len, + inet_ntoa(saddr), pid, (const char *)msg); + } + else { + printf("DeliverCallback: message (len=%lu)from node/pid %d/%d: '%s'\n", + (unsigned long int) msg_len, nodeid, pid, (const char *)msg); + } } static void ConfchgCallback ( @@ -101,27 +91,51 @@ const struct cpg_address *joined_list, size_t joined_list_entries) { int i; + struct in_addr saddr; printf("\nConfchgCallback: group '"); print_cpgname(groupName); printf("'\n"); for (i=0; i