OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2_ch_pipe.c versions 1.24 and 1.25
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/l2_ch_pipe.c 1.24 -> 1.25

--- l2_ch_pipe.c 2001/10/04 12:34:41     1.24
+++ l2_ch_pipe.c 2001/10/04 12:53:54     1.25
@@ -37,7 +37,7 @@
 
 #define L2_PIPE_EXECMODE_DIRECT    1 /* direct command execution             */
 #define L2_PIPE_EXECMODE_SHELL     2 /* shell  command execution             */
-#define L2_PIPE_RUNTIME_RELIABLE   3 /* reliable pipe command processing     */
+#define L2_PIPE_RUNTIME_CONTINU    3 /* continuous pipe command processing   */
 #define L2_PIPE_RUNTIME_ONESHOT    4 /* oneshot  pipe command processing     */
 #define L2_PIPE_WRITEFAIL          6 /* how long before failure occurs       */
 #define L2_PIPE_MAXARGS          256 /* how many args can piped command have */
@@ -49,7 +49,7 @@
     int              piFd[2];    /* pipe file descriptor                 */
     int              iNulldev;   /* null device file descriptor          */
     int              iMode;      /* execution mode direct or shell       */
-    int              iRtme;      /* runtime mode reliable or oneshot     */
+    int              iRtme;      /* runtime mode continuous or oneshot   */
     char            *szCmdpath;  /* path to command and arguments        */
     struct sigaction sigchld;    /* initial state of chld signal handler */
     struct sigaction sigpipe;    /* initial state of pipe signal handler */
@@ -78,7 +78,7 @@
 /* 
  * The lifecycle of the command executed by the pipe channel handler
  * depends on the runtime option selected during configuration. The
- * option 'reliable' describes subsequent behavior which rebuilds an
+ * option 'continuous' describes subsequent behavior which rebuilds an
  * (un)intentionally severed child-controlled pipe. In this case, when
  * the pipe handler encounters a failed write operation, it will attempt
  * the reconnection a user-defined number of times until failure is assumed.
@@ -178,9 +178,9 @@
     char *szRel  = NULL;
 
     /* feed and call generic parameter parsing engine */
-    L2_PARAM_SET(pa[0], execmode, CHARPTR, &szMode); /* mode direct or shell */
-    L2_PARAM_SET(pa[1], runtime,  CHARPTR, &szRel);  /* reliable or oneshot  */
-    L2_PARAM_SET(pa[2], path,     STRING,  &cfg->szCmdpath); /* path of cmd  */
+    L2_PARAM_SET(pa[0], execmode, CHARPTR, &szMode); /* mode direct or shell  */
+    L2_PARAM_SET(pa[1], runtime,  CHARPTR, &szRel);  /* continuous or oneshot */
+    L2_PARAM_SET(pa[2], path,     STRING,  &cfg->szCmdpath); /* path of cmd   */
     L2_PARAM_END(pa[3]);
     if ((rv = l2_util_setparams(pa, fmt, ap)) != L2_OK)
         return rv;
@@ -195,9 +195,9 @@
     }
 
     if (szRel != NULL) {
-        if (strcmp(szRel, "reliable") == 0)
-            cfg->iRtme = L2_PIPE_RUNTIME_RELIABLE;
-        else if (strcmp(szMode, "oneshot") == 0)
+        if (strncmp(szRel, "continuous", strlen("cont")) == 0)
+            cfg->iRtme = L2_PIPE_RUNTIME_CONTINU;
+        else if (strncmp(szMode, "oneshot", strlen("one")) == 0)
             cfg->iRtme = L2_PIPE_RUNTIME_ONESHOT;
         else
             return L2_ERR_ARG;

CVSTrac 2.0.1