fix bug in reading a file url (needs to signal binary if possible)

This commit is contained in:
Dennis Heimbigner 2012-08-21 23:34:25 +00:00
parent 64a78ab239
commit 29d3fe7d51
4 changed files with 2 additions and 16 deletions

2
cf
View File

@ -7,7 +7,7 @@ if test $# != 0 ; then
cmds=$@
fi
#HDF5=1
HDF5=1
DAP=1
#CDMR=1
#RPC=1

View File

@ -341,7 +341,7 @@ static char* decodelist =
char*
dapdecode(DAPlexstate* lexstate, char* name)
{
char* decoded;
char* decoded = NULL;
#ifdef DECODE_IDENTIFIERS
decoded = ocuridecode(name);
#else

View File

@ -409,17 +409,10 @@ ocextractddsinmemory(OCstate* state, OCtree* tree, OCflags flags)
OCerror stat = OC_NOERR;
size_t ddslen, bod, bodfound;
/* Read until we find the separator (or EOF)*/
#ifdef OCDEBUG
fprintf(stderr,"ocextractddsinmemory:\n");
#endif
bodfound = ocfindbod(state->packet,&bod,&ddslen);
if(!bodfound) {/* No BOD; pretend */
bod = tree->data.bod;
ddslen = tree->data.datasize;
#ifdef OCDEBUG
fprintf(stderr,"missing bod: ddslen=%lu bod=%lu\n",
(unsigned long)ddslen,(unsigned long)bod);
#endif
}
tree->data.bod = bod;
tree->data.ddslen = ddslen;
@ -452,9 +445,6 @@ ocextractddsinfile(OCstate* state, OCtree* tree, OCflags flags)
OCerror stat = OC_NOERR;
size_t ddslen, bod, bodfound;
#ifdef OCDEBUG
fprintf(stderr,"ocextractddsinfile:\n");
#endif
/* Read until we find the separator (or EOF)*/
ocbytesclear(state->packet);
rewind(tree->data.file);

View File

@ -134,10 +134,6 @@ ocfindbod(OCbytes* buffer, size_t* bodp, size_t* ddslenp)
*ddslenp = i;
i += tlen;
*bodp = i;
#ifdef OCDEBUG
fprintf(stderr,"findbod: ddslen=%lu bod=%lu\n",
(unsigned long)*ddslenp,(unsigned long)*bodp);
#endif
return 1;
}
}