summaryrefslogtreecommitdiff
path: root/source3/libsmb/libsmb_cache.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-03-03 18:13:33 -0500
committerKarolin Seeger <ks@sernet.de>2008-03-04 09:02:42 +0100
commit2f0a61564ae080b027d43d77428d290fd8ca017b (patch)
treee0a6d6892e148222a922582a5f75aa2412dbc70f /source3/libsmb/libsmb_cache.c
parent8cd0cf153e409dd49e66bd500fad8501371a83a5 (diff)
downloadsamba-2f0a61564ae080b027d43d77428d290fd8ca017b.tar.gz
samba-2f0a61564ae080b027d43d77428d290fd8ca017b.tar.bz2
samba-2f0a61564ae080b027d43d77428d290fd8ca017b.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 (cherry picked from commit a67f96fbe9683b46c2149f7cb439d13f7f0e6ecd) (This used to be commit 046653403fadfa2d42decce7048eca6321b321c6)
Diffstat (limited to 'source3/libsmb/libsmb_cache.c')
-rw-r--r--source3/libsmb/libsmb_cache.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/libsmb/libsmb_cache.c b/source3/libsmb/libsmb_cache.c
index c45aba4544..bfacea368d 100644
--- a/source3/libsmb/libsmb_cache.c
+++ b/source3/libsmb/libsmb_cache.c
@@ -88,7 +88,7 @@ SMBC_add_cached_server(SMBCCTX * context,
goto failed;
}
- DLIST_ADD((context->cache.server_cache_data), srvcache);
+ DLIST_ADD(context->internal->server_cache, srvcache);
return 0;
failed:
@@ -118,7 +118,7 @@ SMBC_get_cached_server(SMBCCTX * context,
struct smbc_server_cache * srv = NULL;
/* Search the cache lines */
- for (srv = context->cache.server_cache_data; srv; srv = srv->next) {
+ for (srv = context->internal->server_cache; srv; srv = srv->next) {
if (strcmp(server,srv->server_name) == 0 &&
strcmp(workgroup,srv->workgroup) == 0 &&
@@ -150,7 +150,7 @@ SMBC_get_cached_server(SMBCCTX * context,
* a connection to the server (other than the
* attribute server connection) is cool.
*/
- if (context->options.one_share_per_server) {
+ if (smbc_getOptionOneSharePerServer(context)) {
/*
* The currently connected share name
* doesn't match the requested share, so
@@ -160,7 +160,7 @@ SMBC_get_cached_server(SMBCCTX * context,
/* Sigh. Couldn't disconnect. */
cli_shutdown(srv->server->cli);
srv->server->cli = NULL;
- context->cache.remove_cached_server_fn(context, srv->server);
+ smbc_getFunctionRemoveCachedServer(context)(context, srv->server);
continue;
}
@@ -175,7 +175,7 @@ SMBC_get_cached_server(SMBCCTX * context,
/* Out of memory. */
cli_shutdown(srv->server->cli);
srv->server->cli = NULL;
- context->cache.remove_cached_server_fn(context, srv->server);
+ smbc_getFunctionRemoveCachedServer(context)(context, srv->server);
continue;
}
@@ -200,11 +200,11 @@ SMBC_remove_cached_server(SMBCCTX * context,
{
struct smbc_server_cache * srv = NULL;
- for (srv = context->cache.server_cache_data; srv; srv = srv->next) {
+ for (srv = context->internal->server_cache; srv; srv = srv->next) {
if (server == srv->server) {
/* remove this sucker */
- DLIST_REMOVE(context->cache.server_cache_data, srv);
+ DLIST_REMOVE(context->internal->server_cache, srv);
SAFE_FREE(srv->server_name);
SAFE_FREE(srv->share_name);
SAFE_FREE(srv->workgroup);
@@ -229,7 +229,7 @@ SMBC_purge_cached_servers(SMBCCTX * context)
struct smbc_server_cache * next;
int could_not_purge_all = 0;
- for (srv = context->cache.server_cache_data,
+ for (srv = context->internal->server_cache,
next = (srv ? srv->next :NULL);
srv;
srv = next,