Changeset 2427 for trunk/packages/vizservers/pymolproxy/pymolproxy.c
- Timestamp:
- Aug 28, 2011 11:18:23 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/pymolproxy/pymolproxy.c
r2419 r2427 675 675 #endif 676 676 if (nWritten < 0) { 677 ERROR("Error writing fd(%d), %d/%s.", fd, errno, 678 strerror(errno)); 677 ERROR("Error writing fd=%d, %s", fd, strerror(errno)); 679 678 return; 680 679 } … … 725 724 nWritten = write(proxyPtr->sin, buffer, length); 726 725 if (nWritten != length) { 727 ERROR("short write to pymol (wrote=%d, should have been %d) ",728 nWritten, length );726 ERROR("short write to pymol (wrote=%d, should have been %d): %s", 727 nWritten, length, strerror(errno)); 729 728 } 730 729 for (p = buffer; *p != '\0'; p++) { … … 738 737 result = Expect(proxyPtr, expect, buffer, BUFSIZ); 739 738 if (result == BUFFER_ERROR) { 740 ERROR("timeout reading data (buffer=%s) ", buffer);739 ERROR("timeout reading data (buffer=%s): %s", buffer, strerror(errno)); 741 740 proxyPtr->error = 1; 742 741 proxyPtr->status = TCL_ERROR; … … 864 863 strcpy(imgPtr->data, buffer); 865 864 if (GetBytes(&proxyPtr->server, imgPtr->data + length, nBytes)!=BUFFER_OK){ 866 ERROR("can't read %d bytes for \"image follows\" buffer", nBytes); 865 ERROR("can't read %d bytes for \"image follows\" buffer: %s", nBytes, 866 strerror(errno)); 867 867 return TCL_ERROR; 868 868 } … … 1344 1344 strcpy(imgPtr->data, buffer); 1345 1345 if (GetBytes(&proxyPtr->server, imgPtr->data + length, nBytes)!=BUFFER_OK){ 1346 ERROR("can't read %d bytes for \"image follows\" buffer", nBytes); 1346 ERROR("can't read %d bytes for \"image follows\" buffer: %s", nBytes, 1347 strerror(errno)); 1347 1348 return TCL_ERROR; 1348 1349 } … … 1408 1409 strcpy(imgPtr->data, buffer); 1409 1410 if (GetBytes(&proxyPtr->server, imgPtr->data + length, nBytes)!=BUFFER_OK){ 1410 ERROR("can't read %d bytes for \"image follows\" buffer", nBytes); 1411 ERROR("can't read %d bytes for \"image follows\" buffer: %s", nBytes, 1412 strerror(errno)); 1411 1413 return TCL_ERROR; 1412 1414 } … … 2000 2002 2001 2003 execvp(argv[0], argv); 2002 ERROR(" Failed to start pymol `%s'", argv[0]);2004 ERROR("can't exec `%s': %s", argv[0], strerror(errno)); 2003 2005 exit(-1); 2004 2006 } … … 2165 2167 Debug("Done with pymol stdout\n"); 2166 2168 } else { 2167 ERROR("Failed reading pymol stdout (nBytes=%d)\n", nBytes); 2169 ERROR("can't read pymol stdout (nBytes=%d): %s\n", nBytes, 2170 strerror(errno)); 2168 2171 goto error; /* Get out on EOF or error. */ 2169 2172 } … … 2182 2185 strerror(errno)); 2183 2186 if (errno != EINTR) { 2184 ERROR("lost connection (stderr) to pymol server."); 2187 ERROR("lost connection (stderr) to pymol server: %s", 2188 strerror(errno)); 2185 2189 goto error; 2186 2190 } … … 2214 2218 break; 2215 2219 } 2216 ERROR("Failed reading client stdout (nBytes=%d)\n", nBytes); 2220 ERROR("can't read client stdout (nBytes=%d): %s\n", nBytes, 2221 strerror(errno)); 2217 2222 goto error; /* Get out on EOF or error. */ 2218 2223 }
Note: See TracChangeset
for help on using the changeset viewer.