Changeset 6602 for pymolproxy


Ignore:
Timestamp:
Nov 10, 2016 6:05:35 PM (8 years ago)
Author:
ldelgass
Message:

debug message cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pymolproxy/trunk/pymolproxy.c

    r6601 r6602  
    273273
    274274    if (debug) {
    275         DEBUG("%s\n", message);
     275        DEBUG("%s", message);
    276276    } else {
    277277        syslog(priority, message, length);
     
    18571857    if (result != TCL_OK) {
    18581858#if EXEC_DEBUG
    1859         DEBUG("result was %s\n", Tcl_GetString(Tcl_GetObjResult(interp)));
     1859        DEBUG("result was %s", Tcl_GetString(Tcl_GetObjResult(interp)));
    18601860#endif
    18611861    }
     
    21052105
    21062106#if DEBUG
    2107     DEBUG("Entering InitProxy\n");
     2107    DEBUG("Entering InitProxy");
    21082108#endif
    21092109    /* Create two pipes for communication with the external application. One
     
    21222122    child = fork();
    21232123    if (child < 0) {
    2124         ERROR("can't fork process: %s\n", strerror(errno));
     2124        ERROR("can't fork process: %s", strerror(errno));
    21252125        return -3;
    21262126    }
     
    21672167
    21682168#if DEBUG
    2169     DEBUG("Started %s DISPLAY=%s\n", argv[0], getenv("DISPLAY"));
     2169    DEBUG("Started %s DISPLAY=%s", argv[0], getenv("DISPLAY"));
    21702170#endif
    21712171    /* close opposite end of pipe, these now belong to the child process  */
     
    21942194        for (cp = cmdProcs; cp->name != NULL; cp++) {
    21952195#if DEBUG
    2196             DEBUG("Adding command %s\n", cp->name);
     2196            DEBUG("Adding command %s", cp->name);
    21972197#endif
    21982198            Tcl_CreateCommand(interp, cp->name, cp->proc, p, NULL);
     
    22872287            status = GetLine(&p->client, &numBytes, &line);
    22882288            if (status != BUFFER_OK) {
    2289                 ERROR("can't read client stdout (numBytes=%d): %s\n", numBytes,
     2289                ERROR("can't read client stdout (numBytes=%d): %s", numBytes,
    22902290                      strerror(errno));
    22912291                goto done;
     
    23712371            }
    23722372#if WRITE_DEBUG
    2373             DEBUG("Writer: line found is %s\n", line);
     2373            DEBUG("Writer: line found is \"%.*s\"", (int)len, line);
    23742374#endif
    23752375            if (strncmp(line, "image follows: ", 15) != 0) {
     
    23782378            if (sscanf(line, "image follows: %d %s %d %d\n", &numBytes, cacheId,
    23792379                       &frameNum, &rockOffset) != 4) {
    2380                 ERROR("can't get # bytes from \"%s\"", line);
     2380                ERROR("can't get # bytes from \"%.*s\"", (int)len, line);
    23812381                DEBUG("Leaving Writer thread");
    23822382                return NULL;
    23832383            }
    23842384#if WRITE_DEBUG
    2385             DEBUG("found image line \"%.*s\"", numBytes, line);
     2385            DEBUG("found image line (%d bytes)", numBytes);
    23862386#endif
    23872387            sprintf(header, "nv>image %d %s %d %d\n", numBytes, cacheId,
     
    23892389            hdrLength = strlen(header);
    23902390#if WRITE_DEBUG
    2391             DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d\n", numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength);
     2391            DEBUG("Queueing image numBytes=%d cacheId=%s, frameNum=%d, rockOffset=%d size=%d", numBytes, cacheId, frameNum, rockOffset, numBytes + hdrLength);
    23922392#endif
    23932393            imgPtr = NewImage(&list, numBytes + hdrLength);
     
    24452445        ERROR("Short write on version string", strerror(errno));
    24462446    }
    2447     INFO("Starting pymolproxy (threaded version)");
     2447    DEBUG("Starting pymolproxy");
    24482448
    24492449    InitProxy(&proxy, argv + 1);
Note: See TracChangeset for help on using the changeset viewer.