Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
190ed7fc
Commit
190ed7fc
authored
Feb 16, 2009
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spoolss: Properly initialize the backends.
parent
da257e33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
6 deletions
+27
-6
router.c
dlls/spoolss/router.c
+27
-6
No files found.
dlls/spoolss/router.c
View file @
190ed7fc
...
...
@@ -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
;
...
...
@@ -263,13 +265,22 @@ static backend_t * backend_load(LPWSTR dllname, LPWSTR name, LPWSTR regroot)
*/
BOOL
backend_load_all
(
void
)
{
static
BOOL
failed
=
FALSE
;
backend_t
*
pb
;
pb
=
backend_load
(
localsplW
,
NULL
,
NULL
);
EnterCriticalSection
(
&
backend_cs
);
/* if we failed before, dont try again */
if
(
!
failed
&&
(
used_backends
==
0
))
{
pb
=
backend_load
(
localsplW
,
NULL
,
NULL
);
/* ToDo: parse the registry and load all other backends */
/* ToDo: parse the registry and load all other backends */
return
(
pb
!=
NULL
);
failed
=
(
used_backends
==
0
);
}
LeaveCriticalSection
(
&
backend_cs
);
TRACE
(
"-> %d
\n
"
,
!
failed
);
return
(
!
failed
);
}
/******************************************************************************
...
...
@@ -284,10 +295,20 @@ 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
];
FIXME
(
"server %s not supported
\n
"
,
debugstr_w
(
name
));
EnterCriticalSection
(
&
backend_cs
);
/* Load all backends, when not done yet */
if
(
used_backends
||
backend_load_all
())
{
/* test for the local system first */
if
(
!
name
||
!
name
[
0
])
{
LeaveCriticalSection
(
&
backend_cs
);
return
backend
[
0
];
}
}
FIXME
(
"server %s not supported in %d backends
\n
"
,
debugstr_w
(
name
),
used_backends
);
LeaveCriticalSection
(
&
backend_cs
);
return
NULL
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment