Changeset 1508 for trunk/packages/vizservers/nanovis/Command.cpp
- Timestamp:
- Jun 10, 2009, 7:04:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/nanovis/Command.cpp
r1495 r1508 608 608 } 609 609 Rappture::Outcome err; 610 unsigned int flags;611 flags = RPENC_Z|RPENC_B64;612 610 Trace("Checking header[%.13s]\n", buf.bytes()); 613 611 if (strncmp (buf.bytes(), "@@RP-ENC:", 9) == 0) { 614 flags = RPENC_HDR; 615 } 616 if (!Rappture::encoding::decode(err, buf, flags)) { 617 printf("ERROR -- DECODING\n"); 618 fflush(stdout); 619 Tcl_AppendResult(interp, err.remark(), (char*)NULL); 620 return TCL_ERROR; 612 /* There's a header on the buffer, use it to decode the data. */ 613 if (!Rappture::encoding::decode(err, buf, RPENC_HDR)) { 614 Tcl_AppendResult(interp, err.remark(), (char*)NULL); 615 return TCL_ERROR; 616 } 617 } else if (Rappture::encoding::isBase64(buf.bytes(), buf.size())) { 618 /* No header, but it's base64 encoded. It's likely that it's both 619 * base64 encoded and compressed. */ 620 if (!Rappture::encoding::decode(err, buf, RPENC_B64)) { 621 Tcl_AppendResult(interp, err.remark(), (char*)NULL); 622 return TCL_ERROR; 623 } 621 624 } 622 625 return TCL_OK;
Note: See TracChangeset
for help on using the changeset viewer.