diff options
Diffstat (limited to 'examples/libsmbclient')
-rw-r--r-- | examples/libsmbclient/Makefile | 4 | ||||
-rw-r--r-- | examples/libsmbclient/testctx.c | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile index 7415f4f07e..047addc8f7 100644 --- a/examples/libsmbclient/Makefile +++ b/examples/libsmbclient/Makefile @@ -94,6 +94,10 @@ testwrite: testwrite.o @echo Linking testwrite $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt +testctx: testctx.o + @echo Linking testctx + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBSMBCLIENT) -lpopt + smbsh: make -C smbwrapper diff --git a/examples/libsmbclient/testctx.c b/examples/libsmbclient/testctx.c new file mode 100644 index 0000000000..8820bc8342 --- /dev/null +++ b/examples/libsmbclient/testctx.c @@ -0,0 +1,17 @@ +#include <libsmbclient.h> + +void create_and_destroy_context (void) +{ + SMBCCTX *ctx; + ctx = smbc_new_context (); + smbc_init_context (ctx); + + smbc_free_context (ctx, 1); +} + +int main (int argc, char **argv) +{ + create_and_destroy_context (); + create_and_destroy_context (); + return 0; +} |