Commit fba62c09 authored by rswindell's avatar rswindell
Browse files

Updated last_error entry for smb_getmsgtxt() if no VALID data fields exist for message.

parent 60756c50
......@@ -52,14 +52,10 @@ char HUGE16* SMBCALL smb_getmsgtxt(smb_t* smb, smbmsg_t* msg, ulong mode)
char HUGE16* lzhbuf;
char HUGE16* p;
ushort xlat;
int i,lzh;
uint i;
int lzh; /* BOOL */
long l=0,lzhlen,length;
if(!msg->hdr.total_dfields) {
sprintf(smb->last_error,"no data fields");
return(NULL);
}
for(i=0;i<msg->hdr.total_dfields;i++) {
if(!(msg->dfield[i].type==TEXT_BODY
|| (mode&GETMSGTXT_TAILS && msg->dfield[i].type==TEXT_TAIL))
......@@ -123,6 +119,10 @@ char HUGE16* SMBCALL smb_getmsgtxt(smb_t* smb, smbmsg_t* msg, ulong mode)
l++;
*(buf+l)=0;
}
if(buf==NULL)
sprintf(smb->last_error,"no data fields");
return(buf);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment