[PATCH] spoolss: Make sure that the backends are initialized, before using them
Detlef Riekenberg
wine.dev at web.de
Tue Feb 10 13:47:00 CST 2009
---
dlls/spoolss/router.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/dlls/spoolss/router.c b/dlls/spoolss/router.c
index c3b9bb8..d178856 100644
--- a/dlls/spoolss/router.c
+++ b/dlls/spoolss/router.c
@@ -211,6 +211,8 @@ static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot)
DWORD id;
DWORD res;
+ TRACE("(%s, %s, %s)\n", debugstr_w(dllname), debugstr_w(name), debugstr_w(regroot));
+
EnterCriticalSection(&backend_cs);
id = used_backends;
@@ -284,10 +286,14 @@ BOOL backend_load_all(void)
*/
static backend_t * backend_first(LPWSTR name)
{
- /* test for the local system first */
- if(!name || !name[0]) return backend[0];
+ /* Load all backends, when not done yet */
+ if (used_backends || backend_load_all()) {
+
+ /* test for the local system first */
+ if(!name || !name[0]) return backend[0];
+ }
- FIXME("server %s not supported\n", debugstr_w(name));
+ FIXME("server %s not supported in %d backends\n", debugstr_w(name), used_backends);
return NULL;
}
--
1.5.4.3
--=-Ctb2q+n9p0mO9R4l64fp--
More information about the wine-patches
mailing list