OSSP CVS Repository

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

ossp-pkg/l2/l2_ch_pipe.c 1.27 -> 1.28

--- l2_ch_pipe.c 2001/11/07 11:37:18     1.27
+++ l2_ch_pipe.c 2001/11/07 13:05:20     1.28
@@ -176,13 +176,15 @@
     l2_result_t rv;
     char *szMode = NULL;
     char *szRel  = NULL;
+    l2_env_t *env;
 
     /* 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);  /* continuous or oneshot */
-    L2_PARAM_SET(pa[2], path,     STRING,  &cfg->szCmdpath); /* path of cmd   */
+    L2_PARAM_SET(pa[0], execmode, STR, &szMode); /* mode direct or shell  */
+    L2_PARAM_SET(pa[1], runtime,  STR, &szRel);  /* continuous or oneshot */
+    L2_PARAM_SET(pa[2], path,     STR, &cfg->szCmdpath); /* path of cmd   */
     L2_PARAM_END(pa[3]);
-    if ((rv = l2_util_setparams(pa, fmt, ap)) != L2_OK)
+    l2_channel_env(ch, &env);
+    if ((rv = l2_util_setparams(env, pa, fmt, ap)) != L2_OK)
         return rv;
 
     if (szMode != NULL) {
@@ -192,6 +194,7 @@
             cfg->iMode = L2_PIPE_EXECMODE_SHELL;
         else
             return L2_ERR_ARG;
+        free(szMode);
     }
 
     if (szRel != NULL) {
@@ -201,6 +204,7 @@
             cfg->iRtme = L2_PIPE_RUNTIME_ONESHOT;
         else
             return L2_ERR_ARG;
+        free(szRel);
     }
 
     return L2_OK;

CVSTrac 2.0.1