The Samba-Bugzilla – Attachment 1620 Details for
Bug 3338
libsmbclient query for NetBIOS name every opendir() calls with the same argument.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test3.c program to reproduce the problem
test3.c (text/plain), 1.21 KB, created by
Mikhail Kshevetskiy (dead mail account)
on 2005-12-17 16:15:47 UTC
(
hide
)
Description:
test3.c program to reproduce the problem
Filename:
MIME Type:
Creator:
Mikhail Kshevetskiy (dead mail account)
Created:
2005-12-17 16:15:47 UTC
Size:
1.21 KB
patch
obsolete
>#include <stdio.h> >#include <stdlib.h> >#include <malloc.h> >#include <string.h> >#include <libsmbclient.h> > >int debuglevel = 10; >char *workgroup = ""; >char *username = ""; >char *password = ""; > >void smbc_auth_fn( > const char *server, > const char *share, > char *wrkgrp, int wrkgrplen, > char *user, int userlen, > char *passwd, int passwdlen){ > > (void) server; > (void) share; > (void) wrkgrp; > (void) wrkgrplen; > >// strncpy(wrkgrp, workgroup, wrkgrplen - 1); wrkgrp[wrkgrplen - 1] = 0; >// strncpy(user, username, userlen - 1); user[userlen - 1] = 0; >// strncpy(passwd, password, passwdlen - 1); passwd[passwdlen - 1] = 0; >} > >int main(){ > int i; > SMBCCTX *ctx; > SMBCFILE *fd; > > if ((ctx = smbc_new_context()) == NULL) return 1; > ctx->debug = debuglevel; > ctx->callbacks.auth_fn = smbc_auth_fn; > if (smbc_init_context(ctx) == NULL){ > smbc_free_context(ctx, 1); > return 1; > } > > for(i = 0; i < 10; i++){ > printf("-- %d -------------\n", i); > fflush(stdout); > if ((fd = ctx->opendir(ctx, "smb://laska")) != NULL) > ctx->close_fn(ctx, fd); > /* ctx->callbacks.purge_cached_fn(ctx); */ > } > smbc_free_context(ctx, 1); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3338
: 1620 |
1621