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
e7c9a0e1
Commit
e7c9a0e1
authored
Jul 29, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use weak reference between console input and renderer objects.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6b26674
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
console.c
server/console.c
+7
-6
No files found.
server/console.c
View file @
e7c9a0e1
...
...
@@ -131,6 +131,7 @@ struct console_input_events
{
struct
object
obj
;
/* object header */
struct
fd
*
fd
;
/* pseudo-fd for ioctls */
struct
console_input
*
console
;
/* attached console */
int
num_alloc
;
/* number of allocated events */
int
num_used
;
/* number of actually used events */
struct
condrv_renderer_event
*
events
;
...
...
@@ -321,6 +322,7 @@ static void console_input_events_destroy( struct object *obj )
{
struct
console_input_events
*
evts
=
(
struct
console_input_events
*
)
obj
;
assert
(
obj
->
ops
==
&
console_input_events_ops
);
if
(
evts
->
console
)
evts
->
console
->
evt
=
NULL
;
free_async_queue
(
&
evts
->
read_q
);
if
(
evts
->
fd
)
release_object
(
evts
->
fd
);
free
(
evts
->
events
);
...
...
@@ -419,6 +421,7 @@ static struct object *create_console_input_events(void)
struct
console_input_events
*
evt
;
if
(
!
(
evt
=
alloc_object
(
&
console_input_events_ops
)))
return
NULL
;
evt
->
console
=
NULL
;
evt
->
num_alloc
=
evt
->
num_used
=
0
;
evt
->
events
=
NULL
;
init_async_queue
(
&
evt
->
read_q
);
...
...
@@ -1177,10 +1180,7 @@ static void console_input_destroy( struct object *obj )
free_async_queue
(
&
console_in
->
read_q
);
if
(
console_in
->
evt
)
{
release_object
(
console_in
->
evt
);
console_in
->
evt
=
NULL
;
}
console_in
->
evt
->
console
=
NULL
;
if
(
console_in
->
event
)
release_object
(
console_in
->
event
);
if
(
console_in
->
fd
)
...
...
@@ -1898,10 +1898,11 @@ static int console_input_events_ioctl( struct fd *fd, ioctl_code_t code, struct
0
,
&
console_input_ops
);
if
(
!
console_input
)
return
0
;
if
(
!
console_input
->
evt
)
if
(
!
console_input
->
evt
&&
!
evts
->
console
)
{
console_input
->
evt
=
(
struct
console_input_events
*
)
grab_object
(
evts
)
;
console_input
->
evt
=
evts
;
console_input
->
renderer
=
current
;
evts
->
console
=
console_input
;
}
else
set_error
(
STATUS_INVALID_HANDLE
);
...
...
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