Author: mladen.turk(a)jboss.com
Date: 2009-01-30 10:41:07 -0500 (Fri, 30 Jan 2009)
New Revision: 2256
Modified:
trunk/mod_cluster/native/advertise/mod_advertise.c
Log:
First try to do a group join, then fallback to loopback
Modified: trunk/mod_cluster/native/advertise/mod_advertise.c
===================================================================
--- trunk/mod_cluster/native/advertise/mod_advertise.c 2009-01-30 15:31:15 UTC (rev 2255)
+++ trunk/mod_cluster/native/advertise/mod_advertise.c 2009-01-30 15:41:07 UTC (rev 2256)
@@ -350,22 +350,17 @@
"mod_advertise: ma_group_join apr_socket_create failed");
return rv;
}
-#if 1
- if ((rv = apr_mcast_loopback(ma_mgroup_socket, 1)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
- "mod_advertise: ma_group_join apr_mcast_loopback
failed");
- return rv;
- }
-#else
if ((rv = apr_mcast_join(ma_mgroup_socket, ma_mgroup_sa,
NULL, NULL)) != APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
- "mod_advertise: ma_group_join apr_mcast_join failed %d
%d",
- ma_mgroup_sa->family, APR_ENOTIMPL);
- apr_socket_close(ma_mgroup_socket);
- return rv;
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s,
+ "mod_advertise: ma_group_join apr_mcast_join failed");
+ if ((rv = apr_mcast_loopback(ma_mgroup_socket, 1)) != APR_SUCCESS) {
+ ap_log_error(APLOG_MARK, APLOG_WARNING, rv, s,
+ "mod_advertise: ma_group_join apr_mcast_loopback
failed");
+ apr_socket_close(ma_mgroup_socket);
+ return rv;
+ }
}
-#endif
if ((rv = apr_mcast_hops(ma_mgroup_socket,
MA_ADVERTISE_HOPS)) != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, rv, s,
Show replies by date