summaryrefslogtreecommitdiff
path: root/source3/libsmb/clilist.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clilist.c')
-rw-r--r--source3/libsmb/clilist.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 3eacc25380..17a759f9e3 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -22,13 +22,13 @@
#include "includes.h"
+
/****************************************************************************
- Interpret a long filename structure - this is mostly guesses at the moment.
- The length of the structure is returned
- The structure of a long filename depends on the info level. 260 is used
- by NT and 2 is used by OS/2
+interpret a long filename structure - this is mostly guesses at the moment
+The length of the structure is returned
+The structure of a long filename depends on the info level. 260 is used
+by NT and 2 is used by OS/2
****************************************************************************/
-
static int interpret_long_filename(struct cli_state *cli,
int level,char *p,file_info *finfo)
{
@@ -41,7 +41,8 @@ static int interpret_long_filename(struct cli_state *cli,
memcpy(finfo,&def_finfo,sizeof(*finfo));
- switch (level) {
+ switch (level)
+ {
case 1: /* OS/2 understands this */
/* these dates are converted to GMT by
make_unix_date */
@@ -125,16 +126,16 @@ static int interpret_long_filename(struct cli_state *cli,
namelen, 0);
return SVAL(base, 0);
}
- }
+ }
DEBUG(1,("Unknown long filename format %d\n",level));
return(SVAL(p,0));
}
-/****************************************************************************
- Do a directory listing, calling fn on each file found.
-****************************************************************************/
+/****************************************************************************
+ do a directory listing, calling fn on each file found
+ ****************************************************************************/
int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
void (*fn)(file_info *, const char *, void *), void *state)
{
@@ -306,11 +307,12 @@ int cli_list_new(struct cli_state *cli,const char *Mask,uint16 attribute,
return(total_received);
}
+
+
/****************************************************************************
- Interpret a short filename structure.
- The length of the structure is returned.
+interpret a short filename structure
+The length of the structure is returned
****************************************************************************/
-
static int interpret_short_filename(struct cli_state *cli, char *p,file_info *finfo)
{
extern file_info def_finfo;
@@ -332,11 +334,10 @@ static int interpret_short_filename(struct cli_state *cli, char *p,file_info *fi
/****************************************************************************
- Do a directory listing, calling fn on each file found.
- this uses the old SMBsearch interface. It is needed for testing Samba,
- but should otherwise not be used.
-****************************************************************************/
-
+ do a directory listing, calling fn on each file found
+ this uses the old SMBsearch interface. It is needed for testing Samba,
+ but should otherwise not be used
+ ****************************************************************************/
int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
void (*fn)(file_info *, const char *, void *), void *state)
{
@@ -452,15 +453,16 @@ int cli_list_old(struct cli_state *cli,const char *Mask,uint16 attribute,
return(num_received);
}
-/****************************************************************************
- Do a directory listing, calling fn on each file found.
- This auto-switches between old and new style.
-****************************************************************************/
+/****************************************************************************
+ do a directory listing, calling fn on each file found
+ this auto-switches between old and new style
+ ****************************************************************************/
int cli_list(struct cli_state *cli,const char *Mask,uint16 attribute,
void (*fn)(file_info *, const char *, void *), void *state)
{
- if (cli->protocol <= PROTOCOL_LANMAN1)
+ if (cli->protocol <= PROTOCOL_LANMAN1) {
return cli_list_old(cli, Mask, attribute, fn, state);
+ }
return cli_list_new(cli, Mask, attribute, fn, state);
}