Author: derrell Date: 2006-03-01 01:42:37 +0000 (Wed, 01 Mar 2006) New Revision: 13762
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13762 Log: When only allowing one connection per server, the cache needs to track which share is currently connected, or we never know whether a tdis()/tcon() for the new share is required. Modified: trunk/source/libsmb/libsmb_cache.c Changeset: Modified: trunk/source/libsmb/libsmb_cache.c =================================================================== --- trunk/source/libsmb/libsmb_cache.c 2006-03-01 01:41:52 UTC (rev 13761) +++ trunk/source/libsmb/libsmb_cache.c 2006-03-01 01:42:37 UTC (rev 13762) @@ -156,6 +156,17 @@ continue; } + + SAFE_FREE(srv->share_name); + srv->share_name = SMB_STRDUP(share); + if (!srv->share_name) { + /* Out of memory. */ + cli_shutdown(&srv->server->cli); + context->callbacks.remove_cached_srv_fn(context, srv->server); + continue; + } + + return srv->server; } }