Skip to content
Snippets Groups Projects
Commit 1555ad83 authored by rswindell's avatar rswindell
Browse files

Renamed smb_incdat() to smb_incmsgdat() - with macro for backwards compat.

smb_incmsg() is now smb_incmsg_dfields(), which now accepts a number of header
references argument (refs).
smb_incmsg() is now just a macro that calls smb_incmsg_dfields() with 1
for the number of references.
parent 2875e599
No related branches found
No related tags found
No related merge requests found
......@@ -1780,10 +1780,10 @@ int SMBCALL smb_incdat(smb_t* smb, ulong offset, ulong length, ushort refs)
/****************************************************************************/
/* Increments data allocation records (message references) by number of */
/* headers specified (usually 1) */
/* header references specified (usually 1) */
/* The opposite function of smb_freemsg() */
/****************************************************************************/
int SMBCALL smb_incmsg(smb_t* smb, smbmsg_t* msg)
int SMBCALL smb_incmsg_dfields(smb_t* smb, smbmsg_t* msg, ushort refs)
{
int i=0;
int da_opened=0;
......@@ -1800,7 +1800,7 @@ int SMBCALL smb_incmsg(smb_t* smb, smbmsg_t* msg)
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)
,msg->dfield[x].length,refs))!=0)
break;
}
......
......@@ -85,6 +85,10 @@
#define SMB_IS_OPEN(smb) ((smb)->shd_fp!=NULL)
/* Legacy API functions */
#define smb_incmsg(smb,msg) smb_incmsg_dfields(smb,msg,1)
#define smb_incdat smb_incmsgdat
#ifdef __cplusplus
extern "C" {
#endif
......@@ -133,8 +137,8 @@ SMBEXPORT long SMBCALL smb_hallochdr(smb_t* smb);
SMBEXPORT long SMBCALL smb_allocdat(smb_t* smb, ulong length, ushort refs);
SMBEXPORT long SMBCALL smb_fallocdat(smb_t* smb, ulong length, ushort refs);
SMBEXPORT long SMBCALL smb_hallocdat(smb_t* smb);
SMBEXPORT int SMBCALL smb_incmsg(smb_t* smb, smbmsg_t* msg);
SMBEXPORT int SMBCALL smb_incdat(smb_t* smb, ulong offset, ulong length, ushort refs);
SMBEXPORT int SMBCALL smb_incmsg_dfields(smb_t* smb, smbmsg_t* msg, ushort refs);
SMBEXPORT int SMBCALL smb_incmsgdat(smb_t* smb, ulong offset, ulong length, ushort refs);
SMBEXPORT int SMBCALL smb_freemsg(smb_t* smb, smbmsg_t* msg);
SMBEXPORT int SMBCALL smb_freemsg_dfields(smb_t* smb, smbmsg_t* msg, ushort refs);
SMBEXPORT int SMBCALL smb_freemsgdat(smb_t* smb, ulong offset, ulong length, ushort refs);
......
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