Ignore:
Timestamp:
Sep 8, 2011 10:08:40 PM (13 years ago)
Author:
ldelgass
Message:

Log a more descriptive message when exiting on EOF or failed read of socket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/vtkvis_threaded/RpVtkRendererCmd.cpp

    r2499 r2500  
    48904890 * (using a slider on the client).  The down side is you don't render
    48914891 * until there's a lull in the command stream.  If the client needs an
    4892  * image, it can issue a "ppmflush" command.  That breaks us out of the
     4892 * image, it can issue an "imgflush" command.  That breaks us out of the
    48934893 * read loop.
    48944894 */
     
    49124912    while (select(1, &readFds, NULL, NULL, tvPtr) > 0) {
    49134913        if (fgets(buffer, BUFFERSIZE, fin) == NULL) {
    4914             ERROR("Failed to read from client: %s", strerror(errno));
    4915             exit(1);                    /* Terminate the server if we can't
    4916                                          * communicate with the client
    4917                                          * anymore. */
     4914            /* Terminate the server if we can't
     4915             * communicate with the client
     4916             * anymore. */
     4917            if (feof(fin)) {
     4918                INFO("Exiting server on EOF from client");
     4919                exit(0);
     4920            } else {
     4921                ERROR("Exiting server, failed to read from client: %s",
     4922                      strerror(errno));
     4923                exit(1);
     4924            }
    49184925        }
    49194926        buffer[BUFFERSIZE] = '\0';
     
    49224929            status = ExecuteCommand(interp, &command);
    49234930            if (status == TCL_BREAK) {
    4924                 return 1;               /* This was caused by a "ppmflush"
     4931                return 1;               /* This was caused by a "imgflush"
    49254932                                         * command. Break out of the read loop
    49264933                                         * and allow a new image to be
     
    49764983    Tcl_CreateObjCommand(interp, "glyphs",      GlyphsCmd,      clientData, NULL);
    49774984    Tcl_CreateObjCommand(interp, "heightmap",   HeightMapCmd,   clientData, NULL);
     4985    Tcl_CreateObjCommand(interp, "imgflush",    ImageFlushCmd,  clientData, NULL);
    49784986    Tcl_CreateObjCommand(interp, "legend",      LegendCmd,      clientData, NULL);
    49794987    Tcl_CreateObjCommand(interp, "lic",         LICCmd,         clientData, NULL);
    49804988    Tcl_CreateObjCommand(interp, "molecule",    MoleculeCmd,    clientData, NULL);
    49814989    Tcl_CreateObjCommand(interp, "polydata",    PolyDataCmd,    clientData, NULL);
    4982     Tcl_CreateObjCommand(interp, "imgflush",    ImageFlushCmd,  clientData, NULL);
    49834990    Tcl_CreateObjCommand(interp, "pseudocolor", PseudoColorCmd, clientData, NULL);
    49844991    Tcl_CreateObjCommand(interp, "renderer",    RendererCmd,    clientData, NULL);
     
    49904997/**
    49914998 * \brief Delete Tcl commands and interpreter
    4992  *
    49934999 */
    49945000void Rappture::VtkVis::exitTcl(Tcl_Interp *interp)
     
    50035009    Tcl_DeleteCommand(interp, "glyphs");
    50045010    Tcl_DeleteCommand(interp, "heightmap");
     5011    Tcl_DeleteCommand(interp, "imgflush");
    50055012    Tcl_DeleteCommand(interp, "legend");
    50065013    Tcl_DeleteCommand(interp, "lic");
Note: See TracChangeset for help on using the changeset viewer.