Send Linux-ha-cvs mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."


Today's Topics:

   1. Linux-HA CVS: lib by davidlee from 
      ([email protected])
   2. Linux-HA CVS: lib by davidlee from 
      ([email protected])
   3. Linux-HA CVS: lib by davidlee from 
      ([email protected])
   4. Linux-HA CVS: lib by davidlee from 
      ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Tue, 24 Jan 2006 04:31:49 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by davidlee from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : davidlee
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/clplumbing


Modified Files:
        ipctest.c 


Log Message:
server should close down cleanly
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/ipctest.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- ipctest.c   20 Jan 2006 14:22:51 -0000      1.45
+++ ipctest.c   24 Jan 2006 11:31:49 -0000      1.46
@@ -1,4 +1,4 @@
-/* $Id: ipctest.c,v 1.45 2006/01/20 14:22:51 davidlee Exp $ */
+/* $Id: ipctest.c,v 1.46 2006/01/24 11:31:49 davidlee Exp $ */
 /*
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -310,6 +310,9 @@
 
        rc = serverfunc(channel, count);
 
+       /* server finished: tidy up */
+       wconn->ops->destroy(wconn);
+
        if (verbosity >= 1) {
                cl_log(LOG_DEBUG, "%s[%d]%d: server ended rc:%d",
                  procname, (int)getpid(), __LINE__, rc);




------------------------------

Message: 2
Date: Tue, 24 Jan 2006 05:28:11 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by davidlee from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : davidlee
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/clplumbing


Modified Files:
        ipcsocket.c 


Log Message:
streams path_name better as a pipe than a file (although both seem to work)
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/ipcsocket.c,v
retrieving revision 1.169
retrieving revision 1.170
diff -u -3 -r1.169 -r1.170
--- ipcsocket.c 20 Jan 2006 17:01:32 -0000      1.169
+++ ipcsocket.c 24 Jan 2006 12:28:11 -0000      1.170
@@ -1,4 +1,4 @@
-/* $Id: ipcsocket.c,v 1.169 2006/01/20 17:01:32 davidlee Exp $ */
+/* $Id: ipcsocket.c,v 1.170 2006/01/24 12:28:11 davidlee Exp $ */
 /*
  * ipcsocket unix domain socket implementation of IPC abstraction.
  *
@@ -1805,7 +1805,6 @@
 #if HB_IPC_METHOD == HB_IPC_SOCKET
   struct sockaddr_un my_addr;
 #elif HB_IPC_METHOD == HB_IPC_STREAM
-  int pathfd;
   int pipefds[2];
 #endif
 
@@ -1866,11 +1865,10 @@
                    path_name);
   }
 
-  if ((pathfd = creat(path_name, 0666)) == -1) {
-    cl_perror("socket_wait_conn_new: creat(%s, ...) failure", path_name);
+  if (mkfifo(path_name, s_mode) == -1) {
+    cl_perror("socket_wait_conn_new: mkfifo(%s, ...) failure", path_name);
     return NULL;
   }
-  close(pathfd);
 
   if (fattach(pipefds[1], path_name) == -1) {
     cl_perror("socket_wait_conn_new: fattach(..., %s) failure", path_name);




------------------------------

Message: 3
Date: Tue, 24 Jan 2006 05:35:10 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by davidlee from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : davidlee
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/clplumbing


Modified Files:
        ipcsocket.c 


Log Message:
keep better track server-side streams fds
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/ipcsocket.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -3 -r1.170 -r1.171
--- ipcsocket.c 24 Jan 2006 12:28:11 -0000      1.170
+++ ipcsocket.c 24 Jan 2006 12:35:10 -0000      1.171
@@ -1,4 +1,4 @@
-/* $Id: ipcsocket.c,v 1.170 2006/01/24 12:28:11 davidlee Exp $ */
+/* $Id: ipcsocket.c,v 1.171 2006/01/24 12:35:10 davidlee Exp $ */
 /*
  * ipcsocket unix domain socket implementation of IPC abstraction.
  *
@@ -150,8 +150,13 @@
 struct SOCKET_WAIT_CONN_PRIVATE{
   /* the path name wich the connection will be built on. */
   char path_name[UNIX_PATH_MAX];
+#if HB_IPC_METHOD == HB_IPC_SOCKET
   /* the domain socket. */
   int s;
+#elif HB_IPC_METHOD == HB_IPC_STREAM
+  /* the streams pipe */
+  int pipefds[2];
+#endif
 };
 
 /* channel private data. */
@@ -592,9 +597,16 @@
        struct SOCKET_WAIT_CONN_PRIVATE * wc = wait_conn->ch_private;
 
        if (wc != NULL) {
+#if HB_IPC_METHOD == HB_IPC_SOCKET
                close(wc->s);
                cl_poll_ignore(wc->s);
                unlink(wc->path_name);
+#elif HB_IPC_METHOD == HB_IPC_STREAM
+               close(wc->pipefds[0]);
+               close(wc->pipefds[1]);
+               cl_poll_ignore(wc->pipefds[0]);
+               unlink(wc->path_name);
+#endif
                g_free(wc);
        }
        g_free((void*) wait_conn);
@@ -606,7 +618,11 @@
 {
        struct SOCKET_WAIT_CONN_PRIVATE * wc = wait_conn->ch_private;
 
+#if HB_IPC_METHOD == HB_IPC_SOCKET
        return (wc == NULL ? -1 : wc->s);
+#elif HB_IPC_METHOD == HB_IPC_STREAM
+       return (wc == NULL ? -1 : wc->pipefds[0]);
+#endif
 
 }
 
@@ -1912,7 +1928,12 @@
   }
   
   wait_private =  g_new(struct SOCKET_WAIT_CONN_PRIVATE, 1);
+#if HB_IPC_METHOD == HB_IPC_SOCKET
   wait_private->s = s;
+#elif HB_IPC_METHOD == HB_IPC_STREAM
+  wait_private->pipefds[0] = pipefds[0];
+  wait_private->pipefds[1] = pipefds[1];
+#endif
   strncpy(wait_private->path_name, path_name, sizeof(wait_private->path_name));
   temp_ch = g_new(struct IPC_WAIT_CONNECTION, 1);
   temp_ch->ch_private = (void *) wait_private;




------------------------------

Message: 4
Date: Tue, 24 Jan 2006 07:58:42 -0700 (MST)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: lib by davidlee from 
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>

linux-ha CVS committal

Author  : davidlee
Host    : 
Project : linux-ha
Module  : lib

Dir     : linux-ha/lib/clplumbing


Modified Files:
        ipcsocket.c 


Log Message:
correct a couple of typos
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/lib/clplumbing/ipcsocket.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -3 -r1.171 -r1.172
--- ipcsocket.c 24 Jan 2006 12:35:10 -0000      1.171
+++ ipcsocket.c 24 Jan 2006 14:58:41 -0000      1.172
@@ -1,4 +1,4 @@
-/* $Id: ipcsocket.c,v 1.171 2006/01/24 12:35:10 davidlee Exp $ */
+/* $Id: ipcsocket.c,v 1.172 2006/01/24 14:58:41 davidlee Exp $ */
 /*
  * ipcsocket unix domain socket implementation of IPC abstraction.
  *
@@ -761,7 +761,7 @@
 
 
 /* 
- * destory a ipc queue and clean all memory space assigned to this queue.
+ * destroy a ipc queue and clean all memory space assigned to this queue.
  * parameters:
  *      q  (IN) the pointer to the queue which should be destroied.
  *
@@ -2012,7 +2012,7 @@
   
   temp_ch = g_new(struct IPC_CHANNEL, 1);
   if (temp_ch == NULL){
-         cl_log(LOG_ERR, "socket_server_channel_new:"
+         cl_log(LOG_ERR, "socket_client_channel_new:"
                 " allocating memory for channel failed");
          return NULL;    
   }




------------------------------

_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs


End of Linux-ha-cvs Digest, Vol 26, Issue 52
********************************************

Reply via email to