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
008f14f0
Commit
008f14f0
authored
Jan 29, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Directly return a structure in get_req_unicode_str().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ed268bbf
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
32 additions
and
58 deletions
+32
-58
atom.c
server/atom.c
+2
-4
class.c
server/class.c
+2
-4
completion.c
server/completion.c
+1
-2
device.c
server/device.c
+1
-2
directory.c
server/directory.c
+1
-2
event.c
server/event.c
+2
-4
fd.c
server/fd.c
+1
-2
mapping.c
server/mapping.c
+1
-2
mutex.c
server/mutex.c
+1
-2
process.c
server/process.c
+1
-2
registry.c
server/registry.c
+2
-4
request.h
server/request.h
+5
-3
semaphore.c
server/semaphore.c
+1
-2
symlink.c
server/symlink.c
+1
-2
timer.c
server/timer.c
+1
-2
window.c
server/window.c
+5
-10
winstation.c
server/winstation.c
+4
-9
No files found.
server/atom.c
View file @
008f14f0
...
...
@@ -382,12 +382,11 @@ void release_global_atom( struct winstation *winstation, atom_t atom )
/* add a global atom */
DECL_HANDLER
(
add_atom
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
atom_table
*
table
=
get_table
(
req
->
table
,
1
);
if
(
table
)
{
get_req_unicode_str
(
&
name
);
reply
->
atom
=
add_atom
(
table
,
&
name
);
release_object
(
table
);
}
...
...
@@ -407,12 +406,11 @@ DECL_HANDLER(delete_atom)
/* find a global atom */
DECL_HANDLER
(
find_atom
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
atom_table
*
table
=
get_table
(
req
->
table
,
0
);
if
(
table
)
{
get_req_unicode_str
(
&
name
);
reply
->
atom
=
find_atom
(
table
,
&
name
);
release_object
(
table
);
}
...
...
server/class.c
View file @
008f14f0
...
...
@@ -150,10 +150,9 @@ client_ptr_t get_class_client_ptr( struct window_class *class )
DECL_HANDLER
(
create_class
)
{
struct
window_class
*
class
;
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
atom_t
atom
;
get_req_unicode_str
(
&
name
);
if
(
name
.
len
)
{
atom
=
add_global_atom
(
NULL
,
&
name
);
...
...
@@ -197,10 +196,9 @@ DECL_HANDLER(create_class)
DECL_HANDLER
(
destroy_class
)
{
struct
window_class
*
class
;
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
atom_t
atom
=
req
->
atom
;
get_req_unicode_str
(
&
name
);
if
(
name
.
len
)
atom
=
find_global_atom
(
NULL
,
&
name
);
if
(
!
(
class
=
find_class
(
current
->
process
,
atom
,
req
->
instance
)))
...
...
server/completion.c
View file @
008f14f0
...
...
@@ -196,9 +196,8 @@ DECL_HANDLER(create_completion)
/* open a completion */
DECL_HANDLER
(
open_completion
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
completion_ops
,
&
name
,
req
->
attributes
);
}
...
...
server/device.c
View file @
008f14f0
...
...
@@ -708,7 +708,7 @@ DECL_HANDLER(create_device_manager)
DECL_HANDLER
(
create_device
)
{
struct
device
*
device
;
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
device_manager
*
manager
;
struct
directory
*
root
=
NULL
;
...
...
@@ -716,7 +716,6 @@ DECL_HANDLER(create_device)
0
,
&
device_manager_ops
)))
return
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
{
release_object
(
manager
);
...
...
server/directory.c
View file @
008f14f0
...
...
@@ -522,9 +522,8 @@ DECL_HANDLER(create_directory)
/* open a directory object */
DECL_HANDLER
(
open_directory
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
directory_ops
,
&
name
,
req
->
attributes
);
}
...
...
server/event.c
View file @
008f14f0
...
...
@@ -306,9 +306,8 @@ DECL_HANDLER(create_event)
/* open a handle to an event */
DECL_HANDLER
(
open_event
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
event_ops
,
&
name
,
req
->
attributes
);
}
...
...
@@ -378,9 +377,8 @@ DECL_HANDLER(create_keyed_event)
/* open a handle to a keyed event */
DECL_HANDLER
(
open_keyed_event
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
keyed_event_ops
,
&
name
,
req
->
attributes
);
}
server/fd.c
View file @
008f14f0
...
...
@@ -2384,11 +2384,10 @@ DECL_HANDLER(flush)
/* open a file object */
DECL_HANDLER
(
open_file_object
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
directory
*
root
=
NULL
;
struct
object
*
obj
,
*
result
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
{
if
(
get_error
()
!=
STATUS_OBJECT_TYPE_MISMATCH
)
return
;
...
...
server/mapping.c
View file @
008f14f0
...
...
@@ -687,9 +687,8 @@ DECL_HANDLER(create_mapping)
/* open a handle to a mapping */
DECL_HANDLER
(
open_mapping
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
mapping_ops
,
&
name
,
req
->
attributes
);
}
...
...
server/mutex.c
View file @
008f14f0
...
...
@@ -233,9 +233,8 @@ DECL_HANDLER(create_mutex)
/* open a handle to a mutex */
DECL_HANDLER
(
open_mutex
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
mutex_ops
,
&
name
,
req
->
attributes
);
}
...
...
server/process.c
View file @
008f14f0
...
...
@@ -1561,9 +1561,8 @@ DECL_HANDLER(create_job)
/* open a job object */
DECL_HANDLER
(
open_job
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
job_ops
,
&
name
,
req
->
attributes
);
}
...
...
server/registry.c
View file @
008f14f0
...
...
@@ -2142,12 +2142,11 @@ DECL_HANDLER(set_key_value)
DECL_HANDLER
(
get_key_value
)
{
struct
key
*
key
;
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
reply
->
total
=
0
;
if
((
key
=
get_hkey_obj
(
req
->
hkey
,
KEY_QUERY_VALUE
)))
{
get_req_unicode_str
(
&
name
);
get_value
(
key
,
&
name
,
&
reply
->
type
,
&
reply
->
total
);
release_object
(
key
);
}
...
...
@@ -2169,11 +2168,10 @@ DECL_HANDLER(enum_key_value)
DECL_HANDLER
(
delete_key_value
)
{
struct
key
*
key
;
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
if
((
key
=
get_hkey_obj
(
req
->
hkey
,
KEY_SET_VALUE
)))
{
get_req_unicode_str
(
&
name
);
delete_value
(
key
,
&
name
);
release_object
(
key
);
}
...
...
server/request.h
View file @
008f14f0
...
...
@@ -77,10 +77,12 @@ static inline data_size_t get_req_data_size(void)
}
/* get the request vararg as unicode string */
static
inline
void
get_req_unicode_str
(
struct
unicode_str
*
str
)
static
inline
struct
unicode_str
get_req_unicode_str
(
void
)
{
str
->
str
=
get_req_data
();
str
->
len
=
(
get_req_data_size
()
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
);
struct
unicode_str
ret
;
ret
.
str
=
get_req_data
();
ret
.
len
=
(
get_req_data_size
()
/
sizeof
(
WCHAR
))
*
sizeof
(
WCHAR
);
return
ret
;
}
/* get the reply maximum vararg size */
...
...
server/semaphore.c
View file @
008f14f0
...
...
@@ -201,9 +201,8 @@ DECL_HANDLER(create_semaphore)
/* open a handle to a semaphore */
DECL_HANDLER
(
open_semaphore
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
semaphore_ops
,
&
name
,
req
->
attributes
);
}
...
...
server/symlink.c
View file @
008f14f0
...
...
@@ -189,9 +189,8 @@ DECL_HANDLER(create_symlink)
/* open a symbolic link object */
DECL_HANDLER
(
open_symlink
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
symlink_ops
,
&
name
,
req
->
attributes
|
OBJ_OPENLINK
);
}
...
...
server/timer.c
View file @
008f14f0
...
...
@@ -251,9 +251,8 @@ DECL_HANDLER(create_timer)
/* open a handle to a timer */
DECL_HANDLER
(
open_timer
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
timer_ops
,
&
name
,
req
->
attributes
);
}
...
...
server/window.c
View file @
008f14f0
...
...
@@ -1884,7 +1884,7 @@ void destroy_window( struct window *win )
DECL_HANDLER
(
create_window
)
{
struct
window
*
win
,
*
parent
=
NULL
,
*
owner
=
NULL
;
struct
unicode_str
cls_name
;
struct
unicode_str
cls_name
=
get_req_unicode_str
()
;
atom_t
atom
;
reply
->
handle
=
0
;
...
...
@@ -1904,7 +1904,6 @@ DECL_HANDLER(create_window)
while
(
!
is_desktop_window
(
owner
->
parent
))
owner
=
owner
->
parent
;
}
get_req_unicode_str
(
&
cls_name
);
atom
=
cls_name
.
len
?
find_global_atom
(
NULL
,
&
cls_name
)
:
req
->
atom
;
if
(
!
(
win
=
create_window
(
parent
,
owner
,
atom
,
req
->
instance
)))
return
;
...
...
@@ -2118,11 +2117,10 @@ DECL_HANDLER(get_window_children)
unsigned
int
total
;
user_handle_t
*
data
;
data_size_t
len
;
struct
unicode_str
cls_name
;
struct
unicode_str
cls_name
=
get_req_unicode_str
()
;
atom_t
atom
=
req
->
atom
;
struct
desktop
*
desktop
=
NULL
;
get_req_unicode_str
(
&
cls_name
);
if
(
cls_name
.
len
&&
!
(
atom
=
find_global_atom
(
NULL
,
&
cls_name
)))
return
;
if
(
req
->
desktop
)
...
...
@@ -2673,12 +2671,11 @@ DECL_HANDLER(redraw_window)
/* set a window property */
DECL_HANDLER
(
set_window_property
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
window
*
win
=
get_window
(
req
->
window
);
if
(
!
win
)
return
;
get_req_unicode_str
(
&
name
);
if
(
name
.
len
)
{
atom_t
atom
=
add_global_atom
(
NULL
,
&
name
);
...
...
@@ -2695,10 +2692,9 @@ DECL_HANDLER(set_window_property)
/* remove a window property */
DECL_HANDLER
(
remove_window_property
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
window
*
win
=
get_window
(
req
->
window
);
get_req_unicode_str
(
&
name
);
if
(
win
)
{
atom_t
atom
=
name
.
len
?
find_global_atom
(
NULL
,
&
name
)
:
req
->
atom
;
...
...
@@ -2710,10 +2706,9 @@ DECL_HANDLER(remove_window_property)
/* get a window property */
DECL_HANDLER
(
get_window_property
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
window
*
win
=
get_window
(
req
->
window
);
get_req_unicode_str
(
&
name
);
if
(
win
)
{
atom_t
atom
=
name
.
len
?
find_global_atom
(
NULL
,
&
name
)
:
req
->
atom
;
...
...
server/winstation.c
View file @
008f14f0
...
...
@@ -401,11 +401,10 @@ void close_thread_desktop( struct thread *thread )
DECL_HANDLER
(
create_winstation
)
{
struct
winstation
*
winstation
;
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
struct
directory
*
root
=
NULL
;
reply
->
handle
=
0
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
if
((
winstation
=
create_winstation
(
root
,
&
name
,
req
->
attributes
,
req
->
flags
)))
...
...
@@ -419,9 +418,8 @@ DECL_HANDLER(create_winstation)
/* open a handle to a window station */
DECL_HANDLER
(
open_winstation
)
{
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
get_req_unicode_str
(
&
name
);
reply
->
handle
=
open_object
(
current
->
process
,
req
->
rootdir
,
req
->
access
,
&
winstation_ops
,
&
name
,
req
->
attributes
);
}
...
...
@@ -467,10 +465,9 @@ DECL_HANDLER(create_desktop)
{
struct
desktop
*
desktop
;
struct
winstation
*
winstation
;
struct
unicode_str
name
;
struct
unicode_str
name
=
get_req_unicode_str
()
;
reply
->
handle
=
0
;
get_req_unicode_str
(
&
name
);
if
((
winstation
=
get_process_winstation
(
current
->
process
,
WINSTA_CREATEDESKTOP
)))
{
if
((
desktop
=
create_desktop
(
&
name
,
req
->
attributes
,
req
->
flags
,
winstation
)))
...
...
@@ -487,9 +484,7 @@ DECL_HANDLER(open_desktop)
{
struct
winstation
*
winstation
;
struct
object
*
obj
;
struct
unicode_str
name
;
get_req_unicode_str
(
&
name
);
struct
unicode_str
name
=
get_req_unicode_str
();
/* FIXME: check access rights */
if
(
!
req
->
winsta
)
...
...
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