Skip to content
Snippets Groups Projects
Commit 5efad682 authored by rswindell's avatar rswindell
Browse files

smb_incmsg() now opens (and closes) the .sda file if it wasn't already opened

fix for error in mail server:
!BOUNCE ERROR -100 (msgbase not open) incrementing data allocation units
parent 2ec4f24c
No related branches found
No related tags found
No related merge requests found
......@@ -1511,19 +1511,28 @@ int SMBCALL smb_incdat(smb_t* smb, ulong offset, ulong length, ushort headers)
/****************************************************************************/
int SMBCALL smb_incmsg(smb_t* smb, smbmsg_t* msg)
{
int i;
int i=0;
int da_opened=0;
ushort x;
if(smb->status.attr&SMB_HYPERALLOC) /* Nothing to do */
return(0);
if(smb->sda_fp==NULL) {
if((i=smb_open_da(smb))!=0)
return(i);
da_opened=1;
}
for(x=0;x<msg->hdr.total_dfields;x++) {
if((i=smb_incdat(smb,msg->hdr.offset+msg->dfield[x].offset
,msg->dfield[x].length,1))!=0)
return(i);
break;
}
return(0);
if(da_opened)
smb_close_da(smb);
return(i);
}
/****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment