billbarker    2003/03/28 19:33:13

  Modified:    daemon/src/native/nt/procrun procrun.c
  Log:
  A few small fixes.
  
  1) Fix the test so that it is possible to update the parameters for non-JNI services.
  
  2) Make the classpath buffer dynamic, so that there isn't an artificial limit to the 
size of the classpath.
  
  3) Make sure that the debug messages get outputted.
  
  Revision  Changes    Path
  1.12      +10 -4     jakarta-commons-sandbox/daemon/src/native/nt/procrun/procrun.c
  
  Index: procrun.c
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/daemon/src/native/nt/procrun/procrun.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- procrun.c 12 Mar 2003 17:27:58 -0000      1.11
  +++ procrun.c 29 Mar 2003 03:33:13 -0000      1.12
  @@ -150,6 +150,8 @@
           sprintf(tid, "[%04X] %s", GetCurrentThreadId(), buffer);
           if (g_proc_stderr_file > 0)
               write(g_proc_stderr_file, tid, strlen(tid));
  +        else
  +            fprintf(stderr,tid);
   #ifdef _DEBUG_TRACE
           OutputDebugString(tid);
   #endif
  @@ -741,11 +743,15 @@
                                      &klen)) == ERROR_SUCCESS) {
               proc->service.path = pool_strdup(proc->pool, kval);
           }
  -        klen = MAX_PATH;
           if ((err = RegQueryValueEx(key, PROCRUN_PARAMS_IMAGE, NULL, NULL, 
  -                                   (unsigned char *)kval,
  +                                   NULL,
                                      &klen)) == ERROR_SUCCESS) {
  -            proc->service.image = pool_strdup(proc->pool, kval);
  +            proc->service.image = (char *)pool_alloc(proc->pool, klen);
  +            if ((err = RegQueryValueEx(key, PROCRUN_PARAMS_IMAGE, NULL, NULL, 
  +                                   (unsigned char *)proc->service.image,
  +                                   &klen)) != ERROR_SUCCESS) {
  +                proc->service.image = NULL;
  +            }
           }
           klen = MAX_PATH;
           if ((err = RegQueryValueEx(key, PROCRUN_PARAMS_ACCOUNT, NULL, NULL, 
  @@ -2000,7 +2006,7 @@
               break;
       }
   
  -    if (i > argc) {
  +    if (i < argc) {
           if (java && !strnicmp(java, "java", 4))
               arglen = strlen(java) + 1;
           else if (proc->service.name)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to