git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cf5bdd
)
s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()
author
Stefan Metzmacher
<metze@samba.org>
Thu, 4 Feb 2010 13:03:20 +0000
(14:03 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Thu, 4 Feb 2010 13:27:12 +0000
(14:27 +0100)
When we need to do more than one network operation to get the
browse list we need to use the same 'stype' value each time.
metze
source3/libsmb/clirap.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/clirap.c
b/source3/libsmb/clirap.c
index 13e16b26df8e581f21c2f065eeb04fb668fce395..a9a13f7b96d3a2b0173761766f4dec86331d8c82 100644
(file)
--- a/
source3/libsmb/clirap.c
+++ b/
source3/libsmb/clirap.c
@@
-342,6
+342,7
@@
bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
const char *p1;
char *s1, *s2;
TALLOC_CTX *frame = talloc_stackframe();
+ uint32_t entry_stype;
if (p + 26 > rdata_end) {
TALLOC_FREE(frame);
@@
-365,7
+366,7
@@
bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
len++;
}
- stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;
+
entry_
stype = IVAL(p,18) & ~SV_TYPE_LOCAL_LIST_ONLY;
pull_string_talloc(frame,rdata,0,
&s1,sname,16,STR_ASCII);
@@
-377,7
+378,7
@@
bool cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype,
continue;
}
- fn(s1, stype, s2, state);
+ fn(s1,
entry_
stype, s2, state);
TALLOC_FREE(frame);
}