Changeset 3378


Ignore:
Timestamp:
Feb 27, 2013 11:44:58 PM (10 years ago)
Author:
gah
Message:

fixes for new stats file

Location:
trunk/packages/vizservers
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/Command.cpp

    r3377 r3378  
    770770    }
    771771#ifdef KEEPSTATS
     772    int f;
     773
    772774    /* Use the initial client key value pairs as the parts for a generating
    773775     * a unique file name. */
  • trunk/packages/vizservers/nanovis/Makefile.in

    r3377 r3378  
    5959LD_RUN_PATH     = $(libdir):@LD_RPATH@
    6060
    61 SVN_VERSION     = $(shell svnversion)
     61SVN_VERSION     = $(shell svnversion $(srcdir))
    6262
    6363LIBS            = \
  • trunk/packages/vizservers/nanovis/nanovis.cpp

    r3377 r3378  
    296296#define STATSDIR        "/var/tmp/visservers"
    297297
    298 static int
    299 SplitPath(const char *path, int *argcPtr, char ***argvPtr)
    300 {
    301     char **array;
    302     int count;
    303     char *p;
    304     char *s;
    305     size_t addrsize;
    306 
    307     count = 0;
    308     for (p = strchr((char *)path, '/'); p != NULL; p = strchr(p+1, '/')) {
    309         count++;
    310     }
    311     addrsize = (count + 1) * sizeof(char *);
    312     array = (char **)malloc(addrsize + strlen(path) + 1);
    313     s = (char *)array + addrsize;
    314     strcpy(s, path);
    315    
    316     count = 0;
    317     for (p = strtok(s, "/"); p != NULL; p = strtok(NULL, "/")) {
    318         array[count++] = p;
    319     }
    320     *argcPtr = count;
    321     *argvPtr = array;
    322     return count;
    323 }
    324 
    325298int
    326299NanoVis::getStatsFile(Tcl_Obj *objPtr)
     
    331304    int i;
    332305    char fileName[33];
     306    const char *path;
    333307    md5_state_t state;
    334308    md5_byte_t digest[16];
    335309    char *string;
     310    int length;
    336311
    337312    if (objPtr == NULL) {
     
    354329    Tcl_DStringAppend(&ds, STATSDIR, -1);
    355330    Tcl_DStringAppend(&ds, "/", 1);
    356     Tcl_DStringAppend(&dsm fileName, 32);
     331    Tcl_DStringAppend(&ds, fileName, 32);
    357332    path = Tcl_DStringValue(&ds);
    358333
  • trunk/packages/vizservers/pymolproxy/Makefile.in

    r3377 r3378  
    77DEFINES =       -DSTANDALONE
    88EXTRA_CFLAGS =  -Wall
    9 INCLUDES =      $(TCL_INC_SPEC)
     9INCLUDES =      $(TCL_INC_SPEC) -I$(srcdir)
    1010TCL_INC_SPEC =  @TCL_INC_SPEC@
    1111TCL_LIB_SPEC =  @TCL_LIB_SPEC@
  • trunk/packages/vizservers/pymolproxy/pymolproxy2.c

    r3377 r3378  
    595595    Tcl_DStringInit(&ds);
    596596    Tcl_DStringAppend(&ds, string, -1);
    597     Tcl_DStringAppendElement(&ds, "pid", 3);
     597    Tcl_DStringAppendElement(&ds, "pid");
    598598    sprintf(pidstr, "%d", getpid());
    599     Tcl_DStringAppendElement(&ds, pidstr, -1);
     599    Tcl_DStringAppendElement(&ds, pidstr);
    600600
    601601    /* Create a md5 hash of the key/value pairs and use it as the file name. */
     
    608608        sprintf(fileName + i * 2, "%02x", digest[i]);
    609609    }
    610     Tcl_DStringLength(&ds, 0);
     610    Tcl_DStringSetLength(&ds, 0);
    611611    Tcl_DStringAppend(&ds, STATSDIR, -1);
    612612    Tcl_DStringAppend(&ds, "/", 1);
     
    645645    Tcl_DString ds;
    646646    int result;
     647    int f;
    647648
    648649    {
Note: See TracChangeset for help on using the changeset viewer.