Changeset 605 for trunk


Ignore:
Timestamp:
Mar 3, 2007 10:18:41 AM (17 years ago)
Author:
dkearney
Message:

fixed function name for octave put file function
added more error checking in rappture library core for put file functions
adjusted argument list for perl's put file function
added error checking to rapptue buffer

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/perl/Rappture.xs

    r591 r605  
    5858
    5959void
    60 RpLibrary::putFile( path, fileName, fileType, append )
     60RpLibrary::putFile( path, fileName, compress, append )
    6161char *path
    6262char *fileName
    63 int fileType
     63int compress
    6464int append
    6565        CODE:
    66                 THIS->putFile(path,fileName,fileType,append);
     66                THIS->putFile(path,fileName,compress,append);
    6767
    6868void
  • trunk/src/core/RpLibrary.cc

    r597 r605  
    15871587    Rappture::Buffer buf;
    15881588    Rappture::Buffer fileBuf;
     1589    Rappture::Outcome err;
    15891590    unsigned int bytesWritten = 0;
    15901591    std::string value = "";
     
    16051606                if (compress == RPLIB_COMPRESS) {
    16061607                    // base64 decode and un-gzip the data
    1607                     buf.decode();
     1608                    err = buf.decode();
     1609                    if (err) {
     1610                        // decompress and decode failed, return err
     1611                        return *this;
     1612                    }
    16081613                }
    16091614            }
     
    16161621        if (compress == RPLIB_COMPRESS) {
    16171622            // gzip and base64 encode the data
    1618             buf.encode();
     1623            err = buf.encode();
     1624            if (err) {
     1625                // compress and encode failed, return error
     1626                return *this;
     1627            }
    16191628        }
    16201629        else {
  • trunk/src/octave/rpLibPutFile.cc

    r597 r605  
    3232 */
    3333
    34 DEFUN_DLD (rpLibPutString, args, ,
     34DEFUN_DLD (rpLibPutFile, args, ,
    3535"-*- texinfo -*-\n\
    36 [err] = rpLibPutString(@var{libHandle},@var{path},@var{fileName},@var{compress},@var{append})\n\
     36[err] = rpLibPutFile(@var{libHandle},@var{path},@var{fileName},@var{compress},@var{append})\n\
    3737\n\
    3838Clients use this to set the value of a node.  If the @var{path}\n\
  • trunk/src2/core/RpBuffer.cc

    r592 r605  
    623623    if (compress) {
    624624        do_compress(err,*this,bout);
     625        if (err) {
     626            return err;
     627        }
    625628    }
    626629
Note: See TracChangeset for help on using the changeset viewer.