[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/dlm-kernel/src lowcomms.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL46
Changes by:	lhh sourceware org	2007-11-07 15:22:23

Modified files:
	dlm-kernel/src : lowcomms.c 

Log message:
	Revert broken patch & apply correct patch from 338511

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/lowcomms.c.diff?cvsroot=cluster&only_with_tag=RHEL46&r1=1.22.2.17.2.1&r2=1.22.2.17.2.2

--- cluster/dlm-kernel/src/Attic/lowcomms.c	2007/10/30 17:42:04	1.22.2.17.2.1
+++ cluster/dlm-kernel/src/Attic/lowcomms.c	2007/11/07 15:22:23	1.22.2.17.2.2
@@ -586,17 +586,20 @@
 	sock->sk->sk_user_data = con;
 	con->rx_action = receive_from_sock;
 
-	make_sockaddr(&saddr, dlm_config.tcp_port, &addr_len);
-
-	add_sock(sock, con);
-
 	/* Bind to local address before send */
 	memcpy(&my_addr, &local_addr, sizeof(my_addr));
-	result = sock->ops->bind(sock, &my_addr, (int)(sizeof(my_addr)));
+	make_sockaddr(&my_addr, 0, &addr_len);
+	result = sock->ops->bind(sock, (struct sockaddr *) &my_addr,
+				 (int) sizeof(my_addr));
 	if (result < 0) {
-		printk("dlm: could not bind to local address for connect: %d\n", result);
+		printk("dlm: could not bind for connect: %d\n", result);
 	}
 
+	/* Set up for connect */
+	make_sockaddr(&saddr, dlm_config.tcp_port, &addr_len);
+
+	add_sock(sock, con);
+
 	log_debug2("connecting to %d", con->nodeid);
 	result =
 	    sock->ops->connect(sock, (struct sockaddr *) &saddr, addr_len,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]