Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d13095bc
Commit
d13095bc
authored
Dec 05, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Let the directory code handle device names.
parent
cf21d4d7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
17 deletions
+20
-17
directory.c
server/directory.c
+11
-5
mailslot.c
server/mailslot.c
+2
-4
named_pipe.c
server/named_pipe.c
+3
-6
object.h
server/object.h
+4
-2
No files found.
server/directory.c
View file @
d13095bc
...
...
@@ -283,7 +283,7 @@ void *open_object_dir( struct directory *root, const struct unicode_str *name,
/* Global initialization */
static
struct
directory
*
dir_driver
;
static
struct
directory
*
dir_driver
,
*
dir_device
;
static
struct
symlink
*
link_dosdev
,
*
link_global1
,
*
link_global2
,
*
link_local
;
static
struct
named_pipe_device
*
dev_named_pipe
;
static
struct
mailslot_device
*
dev_mailslot
;
...
...
@@ -308,7 +308,13 @@ void init_directories(void)
static
const
struct
unicode_str
link_global_str
=
{
link_globalW
,
sizeof
(
link_globalW
)};
static
const
struct
unicode_str
link_local_str
=
{
link_localW
,
sizeof
(
link_localW
)};
struct
directory
*
dir_global
,
*
dir_basenamed
,
*
dir_device
;
/* devices */
static
const
WCHAR
pipeW
[]
=
{
'P'
,
'I'
,
'P'
,
'E'
};
static
const
WCHAR
mailslotW
[]
=
{
'M'
,
'A'
,
'I'
,
'L'
,
'S'
,
'L'
,
'O'
,
'T'
};
static
const
struct
unicode_str
pipe_str
=
{
pipeW
,
sizeof
(
pipeW
)};
static
const
struct
unicode_str
mailslot_str
=
{
mailslotW
,
sizeof
(
mailslotW
)};
struct
directory
*
dir_global
,
*
dir_basenamed
;
root_directory
=
create_directory
(
NULL
,
NULL
,
0
,
HASH_SIZE
);
dir_driver
=
create_directory
(
root_directory
,
&
dir_driver_str
,
0
,
HASH_SIZE
);
...
...
@@ -325,11 +331,10 @@ void init_directories(void)
link_local
=
create_symlink
(
dir_basenamed
,
&
link_local_str
,
0
,
&
dir_basenamed_str
);
/* devices */
dev_named_pipe
=
create_named_pipe_device
();
dev_mailslot
=
create_mailslot_device
();
dev_named_pipe
=
create_named_pipe_device
(
dir_global
,
&
pipe_str
);
dev_mailslot
=
create_mailslot_device
(
dir_global
,
&
mailslot_str
);
/* the symlinks or devices hold references so we can release these */
release_object
(
dir_device
);
release_object
(
dir_global
);
release_object
(
dir_basenamed
);
}
...
...
@@ -344,6 +349,7 @@ void close_directories(void)
release_object
(
link_global2
);
release_object
(
link_local
);
release_object
(
dir_device
);
release_object
(
dir_driver
);
release_object
(
root_directory
);
}
...
...
server/mailslot.c
View file @
d13095bc
...
...
@@ -269,13 +269,11 @@ static void mailslot_device_destroy( struct object *obj )
free
(
device
->
mailslots
);
}
struct
mailslot_device
*
create_mailslot_device
(
void
)
struct
mailslot_device
*
create_mailslot_device
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
)
{
static
const
WCHAR
mailslotW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'M'
,
'A'
,
'I'
,
'L'
,
'S'
,
'L'
,
'O'
,
'T'
};
static
struct
unicode_str
mailslot
=
{
mailslotW
,
sizeof
(
mailslotW
)};
struct
mailslot_device
*
dev
;
if
((
dev
=
create_named_object_dir
(
NULL
,
&
mailslot
,
0
,
&
mailslot_device_ops
))
&&
if
((
dev
=
create_named_object_dir
(
root
,
name
,
0
,
&
mailslot_device_ops
))
&&
get_error
()
!=
STATUS_OBJECT_NAME_EXISTS
)
{
if
(
!
(
dev
->
mailslots
=
create_namespace
(
7
)))
...
...
server/named_pipe.c
View file @
d13095bc
...
...
@@ -379,8 +379,6 @@ static struct object *named_pipe_device_lookup_name( struct object *obj, struct
assert
(
obj
->
ops
==
&
named_pipe_device_ops
);
assert
(
device
->
pipes
);
if
(
!
name
->
len
)
return
NULL
;
if
((
found
=
find_object
(
device
->
pipes
,
name
,
attr
|
OBJ_CASE_INSENSITIVE
)))
name
->
len
=
0
;
...
...
@@ -397,13 +395,12 @@ static void named_pipe_device_destroy( struct object *obj )
/* this will be deleted as soon an we fix wait_named_pipe */
static
struct
named_pipe_device
*
named_pipe_device
;
struct
named_pipe_device
*
create_named_pipe_device
(
void
)
struct
named_pipe_device
*
create_named_pipe_device
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
)
{
static
const
WCHAR
pipeW
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'P'
,
'I'
,
'P'
,
'E'
};
static
struct
unicode_str
pipe
=
{
pipeW
,
sizeof
(
pipeW
)};
struct
named_pipe_device
*
dev
;
if
((
dev
=
create_named_object_dir
(
NULL
,
&
pip
e
,
0
,
&
named_pipe_device_ops
))
&&
if
((
dev
=
create_named_object_dir
(
root
,
nam
e
,
0
,
&
named_pipe_device_ops
))
&&
get_error
()
!=
STATUS_OBJECT_NAME_EXISTS
)
{
if
(
!
(
dev
->
pipes
=
create_namespace
(
7
)))
...
...
server/object.h
View file @
d13095bc
...
...
@@ -198,8 +198,10 @@ extern struct symlink *create_symlink( struct directory *root, const struct unic
unsigned
int
attr
,
const
struct
unicode_str
*
target
);
/* devices */
extern
struct
named_pipe_device
*
create_named_pipe_device
(
void
);
extern
struct
mailslot_device
*
create_mailslot_device
(
void
);
extern
struct
named_pipe_device
*
create_named_pipe_device
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
);
extern
struct
mailslot_device
*
create_mailslot_device
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
);
/* global variables */
...
...
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