summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmb_path.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-02-29 13:34:35 -0500
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-03-01 20:47:22 -0500
commit4ba42cbe0f6bbd25848786e1a87c06aca79b98ea (patch)
treefa2417599eca2565d0a3f8ace8ef005909fcd6ab /source3/libsmb/libsmb_path.c
parent257b7b09298f7cb983b2f31b87fc5e46e0f62f0c (diff)
downloadsamba-4ba42cbe0f6bbd25848786e1a87c06aca79b98ea.tar.gz
samba-4ba42cbe0f6bbd25848786e1a87c06aca79b98ea.tar.bz2
samba-4ba42cbe0f6bbd25848786e1a87c06aca79b98ea.zip
Modified revamp of the libsmbclient interface.
Given the tacit (if that) approval by some people, and clear disapproval by others for my proposed clean-up and reorganization of libsmbclient, I've come up with a slightly different approach. This commit changes back to the original libsmbclient.h SMBCCTX structure which will maintain ABI compatibility. I retain, here, the setter and getter functions which all new code should use. Older programs already compiled should continue to work fine. Older programs being recompiled will encounter compile-time errors (intentionally!) so that the code can be corrected to use the setter/getter interfaces. Although this doesn't clean up the interface in the way I had wanted, the code reorganization and requirement for new programs to use the setters and getters allows future progress to be made on libsmbclient without further muddying up the interface, while retaining the ABI compatibility that was the big issue causing disapproval. I hope that this compromise is adequate. Derrell (This used to be commit 56429a3d60b2a48963342f6340b3c01469a892c6)
Diffstat (limited to 'source3/libsmb/libsmb_path.c')
-rw-r--r--source3/libsmb/libsmb_path.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/libsmb_path.c b/source3/libsmb/libsmb_path.c
index 2533f536c3..6706a59ba8 100644
--- a/source3/libsmb/libsmb_path.c
+++ b/source3/libsmb/libsmb_path.c
@@ -252,7 +252,8 @@ SMBC_parse_path(TALLOC_CTX *ctx,
* to the workgroup in the provided context.
*/
if (pp_workgroup != NULL) {
- *pp_workgroup = talloc_strdup(ctx, context->workgroup);
+ *pp_workgroup =
+ talloc_strdup(ctx, context->config.workgroup);
}
if (pp_options) {
@@ -296,13 +297,13 @@ SMBC_parse_path(TALLOC_CTX *ctx,
}
if (*p == '/') {
- int wl = strlen(context->workgroup);
+ int wl = strlen(context->config.workgroup);
if (wl > 16) {
wl = 16;
}
- *pp_server = talloc_strdup(ctx, context->workgroup);
+ *pp_server = talloc_strdup(ctx, context->config.workgroup);
if (!*pp_server) {
return -1;
}