Author: vlendec
Date: 2006-07-25 15:53:44 +0000 (Tue, 25 Jul 2006)
New Revision: 17233

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17233

Log:
Dump --with-clusterwide-messaging in favor of --with-cluster-support
Modified:
   branches/tmp/vl-messaging/source/configure.in
   branches/tmp/vl-messaging/source/include/messages.h
   branches/tmp/vl-messaging/source/lib/dbwrap_msg.c
   branches/tmp/vl-messaging/source/lib/messages_stream.c
   branches/tmp/vl-messaging/source/lib/util.c


Changeset:
Modified: branches/tmp/vl-messaging/source/configure.in
===================================================================
--- branches/tmp/vl-messaging/source/configure.in       2006-07-25 15:26:16 UTC 
(rev 17232)
+++ branches/tmp/vl-messaging/source/configure.in       2006-07-25 15:53:44 UTC 
(rev 17233)
@@ -3996,24 +3996,7 @@
   esac ],
   AC_MSG_RESULT(no)
 )
- 
-#################################################
-# Clusterwide messaging
 
-AC_ARG_WITH(clusterwide-messaging,
-[  --with-clusterwide-messaging        Allow clusterwide messaging extensions 
(default=no)],
-[ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_CLUSTERWIDE_MESSAGING,1,[Whether to include clusterwide 
messaging])
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
-
 #################################################
 # check for experimental disk-quotas support
 

Modified: branches/tmp/vl-messaging/source/include/messages.h
===================================================================
--- branches/tmp/vl-messaging/source/include/messages.h 2006-07-25 15:26:16 UTC 
(rev 17232)
+++ branches/tmp/vl-messaging/source/include/messages.h 2006-07-25 15:53:44 UTC 
(rev 17233)
@@ -101,9 +101,9 @@
 
 struct process_id {
        pid_t pid;
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        struct in_addr ip;      
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 };
 
 #define DEFAULT_MESSAGING_PORT                 51000

Modified: branches/tmp/vl-messaging/source/lib/dbwrap_msg.c
===================================================================
--- branches/tmp/vl-messaging/source/lib/dbwrap_msg.c   2006-07-25 15:26:16 UTC 
(rev 17232)
+++ branches/tmp/vl-messaging/source/lib/dbwrap_msg.c   2006-07-25 15:53:44 UTC 
(rev 17233)
@@ -605,9 +605,9 @@
        }
 
        db_msg->lockd.pid = LOCKING_DAEMON_PID;
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        db_msg->lockd.ip = *interpret_addr2(lp_locking_address());
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
        db_msg->record = NULL;
        db_msg->db_index = -1; /* invalid database number */
 

Modified: branches/tmp/vl-messaging/source/lib/messages_stream.c
===================================================================
--- branches/tmp/vl-messaging/source/lib/messages_stream.c      2006-07-25 
15:26:16 UTC (rev 17232)
+++ branches/tmp/vl-messaging/source/lib/messages_stream.c      2006-07-25 
15:53:44 UTC (rev 17233)
@@ -84,7 +84,7 @@
 {
        static char *name = NULL;
        if (name == NULL) {
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
                asprintf(&name, "%s/%s:%s", lock_path("messaging"),
                         lp_messaging_address(), MESSAGING_DISPATCHER_SOCKET);
 #else
@@ -213,7 +213,7 @@
   Is this remote address allowed?
 ****************************************************************************/
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
 #define ALLONES  ((uint32)0xFFFFFFFF)
 #define MKNETADDR(_IP, _NM) ((_IP) & (_NM))
 static BOOL remote_address_allowed(struct sockaddr_in* addr)
@@ -250,7 +250,7 @@
  Incoming tcp connection
 ****************************************************************************/
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
 static void receive_on_socket_tcp(int listener)
 {
        struct messaging_client *c;
@@ -300,7 +300,7 @@
 
        DLIST_ADD(clients_cache, c);
 }
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
 /****************************************************************************
  Dummy function
@@ -362,9 +362,9 @@
        enum messaging_type mtype = (enum messaging_type)lp_messaging_type();
        struct messaging_client *result;
        struct sockaddr_un sunaddr;
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        struct sockaddr_in sinaddr;
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
        result = TALLOC_P(NULL, struct messaging_client);
        if (result == NULL) {
@@ -386,7 +386,7 @@
                        return NULL;
                }
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
                ZERO_STRUCT(sinaddr);
 
                result->pid.pid = MESSAGING_DISPATCHER_PID;
@@ -405,7 +405,7 @@
                DEBUG(0, ("Cannot connect to a remote client - "
                          "clusterwide messaging is disabled\n"));
                return NULL;
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
        } else {
                ZERO_STRUCT(sunaddr);
                
@@ -430,7 +430,7 @@
                return NULL;
        }       
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        if(mtype == MESSAGING_TYPE_DISPATCHER) {
                if (connect(result->fd, (struct sockaddr *)&sinaddr,
                            sizeof(sinaddr)) == 0) {
@@ -438,7 +438,7 @@
                        goto done;
                }
        } else
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
        {
                if (connect(result->fd, (struct sockaddr *)&sunaddr,
                            sizeof(sunaddr)) == 0) {
@@ -847,7 +847,7 @@
  open listening socket for the clusterwide messaging
 ****************************************************************************/
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
 static int open_remote_listener(void)
 {
        int result;
@@ -867,7 +867,7 @@
        }
        return result;
 }
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
 /****************************************************************************
  messaging daemon main loop
@@ -892,10 +892,10 @@
        FD_SET(unix_listener, &rfds);
        maxfd = MAX(maxfd, unix_listener);
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        FD_SET(tcp_listener, &rfds);
        maxfd = MAX(maxfd, tcp_listener);
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
        message_select_setup_stream(&maxfd, &rfds, &wfds);
        
@@ -913,11 +913,11 @@
                return ;
        }
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        if (FD_ISSET(tcp_listener, &rfds)) {
                receive_on_socket_tcp(tcp_listener);
        }
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
        if (FD_ISSET(unix_listener, &rfds)) {
                receive_on_socket_stream(unix_listener, NULL);
@@ -974,12 +974,12 @@
 
        DEBUG(10, ("Dispatcher child started.\n"));
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        asprintf(&name, "%s:%s", lp_messaging_address(),
                 MESSAGING_DISPATCHER_SOCKET);
 #else
        asprintf(&name, "%s", MESSAGING_DISPATCHER_SOCKET);
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
        if (name == NULL) {
                smb_panic("asprintf failed\n");
@@ -992,9 +992,9 @@
                exit(1);
        }
 
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        tcp_fd = open_remote_listener();
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
        ok = True;
        write(parent_pipe, &ok, sizeof(ok));
@@ -1004,13 +1004,13 @@
 
        lockd_pid = pid_to_procid(MESSAGING_DISPATCHER_PID);
        
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        lockd_pid.ip = *interpret_addr2(lp_locking_address());
        /* TODO: improve next line */
        is_lockd = (strcmp(lp_locking_address(), lp_messaging_address()) == 0);
 #else
        is_lockd = True;
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 
        while (parent_pipe >= 0) {
                dispatch_loop(&parent_pipe, fd, tcp_fd, is_lockd, &lockd_pid);

Modified: branches/tmp/vl-messaging/source/lib/util.c
===================================================================
--- branches/tmp/vl-messaging/source/lib/util.c 2006-07-25 15:26:16 UTC (rev 
17232)
+++ branches/tmp/vl-messaging/source/lib/util.c 2006-07-25 15:53:44 UTC (rev 
17233)
@@ -2947,9 +2947,9 @@
 {
        struct process_id result;
        result.pid = pid;
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        result.ip = *interpret_addr2(lp_messaging_address());
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
        return result;
 }
 
@@ -2960,11 +2960,11 @@
 
 BOOL procid_same_node(const struct process_id *p1, const struct process_id *p2)
 {
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        return (memcmp(&p1->ip, &p2->ip, sizeof(p1->ip)) == 0);
 #else
        return True;
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 }
 
 BOOL procid_equal(const struct process_id *p1, const struct process_id *p2)
@@ -2979,7 +2979,7 @@
 
 struct process_id interpret_pid(const char *pid_string)
 {
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        char *p, *tmp, *pid;
        struct process_id result;
 
@@ -3016,17 +3016,17 @@
        return result;
 #else
        return pid_to_procid(atoi(pid_string));
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 }
 
 char *procid_str_static(const struct process_id *pid)
 {
        static fstring str;
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        fstr_sprintf(str, "%s:%d", inet_ntoa(pid->ip), pid->pid);
 #else
        fstr_sprintf(str, "%d", pid->pid);
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
        return str;
 }
 
@@ -3042,12 +3042,12 @@
 
 BOOL procid_is_local(const struct process_id *pid)
 {
-#ifdef WITH_CLUSTERWIDE_MESSAGING
+#ifdef CLUSTER_SUPPORT
        struct in_addr ip = *interpret_addr2(lp_messaging_address());
        return (memcmp(&ip, &pid->ip, sizeof(ip)) == 0);
 #else
        return True;
-#endif /* WITH_CLUSTERWIDE_MESSAGING */
+#endif /* CLUSTER_SUPPORT */
 }
 
 int this_is_smp(void)

Reply via email to