Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
a811ea5d
Commit
a811ea5d
authored
25 years ago
by
Ove Kåven
Committed by
Alexandre Julliard
25 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a couple of missing event notifications. Some more debugging
messages.
parent
365c54e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
misc/comm.c
+12
-2
12 additions, 2 deletions
misc/comm.c
with
12 additions
and
2 deletions
misc/comm.c
+
12
−
2
View file @
a811ea5d
...
...
@@ -235,6 +235,7 @@ static void comm_notification(int fd,void*private)
WORD
mask
=
0
;
int
cid
=
GetCommPort_fd
(
fd
);
TRACE
(
comm
,
"async notification
\n
"
);
/* read data from comm port */
prev
=
comm_inbuf
(
ptr
);
do
{
...
...
@@ -249,8 +250,10 @@ static void comm_notification(int fd,void*private)
if
(
ptr
->
ibuf_head
>=
ptr
->
ibuf_size
)
ptr
->
ibuf_head
=
0
;
/* flag event */
if
(
ptr
->
eventmask
&
EV_RXCHAR
)
if
(
ptr
->
eventmask
&
EV_RXCHAR
)
{
*
(
WORD
*
)(
unknown
[
cid
])
|=
EV_RXCHAR
;
mask
|=
CN_EVENT
;
}
/* FIXME: check for event character (EV_RXFLAG) */
}
}
...
...
@@ -278,8 +281,10 @@ static void comm_notification(int fd,void*private)
if
(
ptr
->
obuf_tail
>=
ptr
->
obuf_size
)
ptr
->
obuf_tail
=
0
;
/* flag event */
if
((
ptr
->
obuf_tail
==
ptr
->
obuf_head
)
&&
(
ptr
->
eventmask
&
EV_TXEMPTY
))
if
((
ptr
->
obuf_tail
==
ptr
->
obuf_head
)
&&
(
ptr
->
eventmask
&
EV_TXEMPTY
))
{
*
(
WORD
*
)(
unknown
[
cid
])
|=
EV_TXEMPTY
;
mask
|=
CN_EVENT
;
}
}
}
while
(
len
>
0
);
/* check for notification */
...
...
@@ -291,6 +296,7 @@ static void comm_notification(int fd,void*private)
/* send notifications, if any */
if
(
ptr
->
wnd
&&
mask
)
{
TRACE
(
comm
,
"notifying %04x: cid=%d, mask=%02x
\n
"
,
ptr
->
wnd
,
cid
,
mask
);
PostMessage16
(
ptr
->
wnd
,
WM_COMMNOTIFY
,
cid
,
mask
);
}
}
...
...
@@ -412,6 +418,7 @@ INT16 WINAPI OpenComm16(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue)
fd
=
open
(
COM
[
port
].
devicename
,
O_RDWR
|
O_NONBLOCK
);
if
(
fd
==
-
1
)
{
ERR
(
comm
,
"error=%d
\n
"
,
errno
);
return
IE_HARDWARE
;
}
else
{
unknown
[
port
]
=
SEGPTR_ALLOC
(
40
);
...
...
@@ -450,11 +457,14 @@ INT16 WINAPI OpenComm16(LPCSTR device,UINT16 cbInQueue,UINT16 cbOutQueue)
/* not enough memory */
tcsetattr
(
COM
[
port
].
fd
,
TCSANOW
,
&
m_stat
[
port
]);
close
(
COM
[
port
].
fd
);
ERR
(
comm
,
"out of memory"
);
return
IE_MEMORY
;
}
/* enable async notifications */
ASYNC_RegisterFD
(
COM
[
port
].
fd
,
comm_notification
,
&
COM
[
port
]);
/* bootstrap notifications, just in case */
comm_notification
(
COM
[
port
].
fd
,
&
COM
[
port
]);
return
port
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment