summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/libsmb_dir.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-03-03 18:13:33 -0500
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-03-03 18:13:33 -0500
commit1363ee9d65965704f716965c6cbcfc0693ca2401 (patch)
tree2c33f142f62fbc5c0d11141aa02d7b641ab60a21 /source3/libsmb/libsmb_dir.c
parent8a05c0a8843c001bdb4ac31e9ea382dd89716b55 (diff)
downloadsamba-1363ee9d65965704f716965c6cbcfc0693ca2401.tar.gz
samba-1363ee9d65965704f716965c6cbcfc0693ca2401.tar.xz
samba-1363ee9d65965704f716965c6cbcfc0693ca2401.zip
Continued revamping of libsmbclient.
- James suggested using gcc's "deprecated" attribute to mark the context structure fields to generate warnings. This creates a scenario with the best of all worlds. I'm able to move to an organization that more easily allows future enhancements, while avoiding any mandatory changes by applications. Thanks, James! - Updated WHATSNEW.txt so that it accurately reflects the current state of affairs. Derrell (This used to be commit a67f96fbe9683b46c2149f7cb439d13f7f0e6ecd)
Diffstat (limited to 'source3/libsmb/libsmb_dir.c')
-rw-r--r--source3/libsmb/libsmb_dir.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c
index 2ece2ab8ed1..1486097d512 100644
--- a/source3/libsmb/libsmb_dir.c
+++ b/source3/libsmb/libsmb_dir.c
@@ -404,7 +404,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
}
if (!user || user[0] == (char)0) {
- user = talloc_strdup(frame, context->config.user);
+ user = talloc_strdup(frame, smbc_getUser(context));
if (!user) {
errno = ENOMEM;
TALLOC_FREE(frame);
@@ -450,9 +450,9 @@ SMBC_opendir_ctx(SMBCCTX *context,
}
/* Determine how many local master browsers to query */
- max_lmb_count = (context->options.browse_max_lmb_count == 0
+ max_lmb_count = (smbc_getOptionBrowseMaxLmbCount(context) == 0
? INT_MAX
- : context->options.browse_max_lmb_count);
+ : smbc_getOptionBrowseMaxLmbCount(context));
memset(&u_info, '\0', sizeof(u_info));
u_info.username = talloc_strdup(frame,user);
@@ -810,11 +810,11 @@ SMBC_opendir_ctx(SMBCCTX *context,
* good any more...
*/
if (cli_is_error(targetcli) &&
- (context->server.check_server_fn)(context, srv)) {
+ smbc_getFunctionCheckServer(context)(context, srv)) {
/* ... then remove it. */
- if ((context->server.remove_unused_server_fn)(context,
- srv)) {
+ if (smbc_getFunctionRemoveUnusedServer(context)(context,
+ srv)) {
/*
* We could not remove the
* server completely, remove
@@ -823,7 +823,7 @@ SMBC_opendir_ctx(SMBCCTX *context,
* will be removed when the
* last file/dir is closed.
*/
- (context->cache.remove_cached_server_fn)(context, srv);
+ smbc_getFunctionRemoveCachedServer(context)(context, srv);
}
}
@@ -884,7 +884,7 @@ smbc_readdir_internal(SMBCCTX * context,
struct smbc_dirent *src,
int max_namebuf_len)
{
- if (context->options.urlencode_readdir_entries) {
+ if (smbc_getOptionUrlEncodeReaddirEntries(context)) {
/* url-encode the name. get back remaining buffer space */
max_namebuf_len =
@@ -1142,7 +1142,7 @@ SMBC_mkdir_ctx(SMBCCTX *context,
}
if (!user || user[0] == (char)0) {
- user = talloc_strdup(frame, context->config.user);
+ user = talloc_strdup(frame, smbc_getUser(context));
if (!user) {
errno = ENOMEM;
TALLOC_FREE(frame);
@@ -1249,7 +1249,7 @@ SMBC_rmdir_ctx(SMBCCTX *context,
}
if (!user || user[0] == (char)0) {
- user = talloc_strdup(frame, context->config.user);
+ user = talloc_strdup(frame, smbc_getUser(context));
if (!user) {
errno = ENOMEM;
TALLOC_FREE(frame);
@@ -1531,7 +1531,7 @@ SMBC_chmod_ctx(SMBCCTX *context,
}
if (!user || user[0] == (char)0) {
- user = talloc_strdup(frame, context->config.user);
+ user = talloc_strdup(frame, smbc_getUser(context));
if (!user) {
errno = ENOMEM;
TALLOC_FREE(frame);
@@ -1637,7 +1637,7 @@ SMBC_utimes_ctx(SMBCCTX *context,
}
if (!user || user[0] == (char)0) {
- user = talloc_strdup(frame, context->config.user);
+ user = talloc_strdup(frame, smbc_getUser(context));
if (!user) {
errno = ENOMEM;
TALLOC_FREE(frame);
@@ -1713,7 +1713,7 @@ SMBC_unlink_ctx(SMBCCTX *context,
}
if (!user || user[0] == (char)0) {
- user = talloc_strdup(frame, context->config.user);
+ user = talloc_strdup(frame, smbc_getUser(context));
if (!user) {
errno = ENOMEM;
TALLOC_FREE(frame);
@@ -1848,7 +1848,7 @@ SMBC_rename_ctx(SMBCCTX *ocontext,
}
if (!user1 || user1[0] == (char)0) {
- user1 = talloc_strdup(frame, ocontext->config.user);
+ user1 = talloc_strdup(frame, smbc_getUser(ocontext));
if (!user1) {
errno = ENOMEM;
TALLOC_FREE(frame);
@@ -1872,7 +1872,7 @@ SMBC_rename_ctx(SMBCCTX *ocontext,
}
if (!user2 || user2[0] == (char)0) {
- user2 = talloc_strdup(frame, ncontext->config.user);
+ user2 = talloc_strdup(frame, smbc_getUser(ncontext));
if (!user2) {
errno = ENOMEM;
TALLOC_FREE(frame);