[PATCH] s4/torture: make --unclist active with smb2 testcases
Jeremy Allison
jra at samba.org
Mon Aug 28 21:33:06 UTC 2017
On Mon, Aug 28, 2017 at 01:46:54PM +0000, Peter Somogyi wrote:
> Hi Jeremy,
>
> > +#include "source4/torture/util.h"
> ...
> > You need to copy the returned host and share strings
> > using talloc_strdup() first before you can pass them
> > to torture_get_conn_index().
>
> Attaching the adjustments, hope it compiles for you now.
Nope, you can't mix declarations and code (the:
+ mem_ctx = talloc_new(tctx);
+ if (mem_ctx == NULL) {
+ return false;
+ }
+
+ char *host2 = NULL;
+ char *share2 = NULL;
is wrong. Also, looks like I misunderstood the API
here. If torture_get_conn_index() allocates host2
and share2, then you can just set host = host2,
share = share2 as assigning from char * to const char *
is allowed.
Here is what I ended up with. Please check.
Jeremy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-torture-make-unclist-active-with-smb2-testcases.patch
Type: text/x-diff
Size: 2243 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170828/5877440a/0001-s4-torture-make-unclist-active-with-smb2-testcases.diff>
More information about the samba-technical
mailing list