Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
0200b514
Commit
0200b514
authored
Sep 21, 2014
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed CE with old libevent
parent
4a773fe6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
interface.h
interface.h
+1
-0
loop.c
loop.c
+3
-3
No files found.
interface.h
View file @
0200b514
...
...
@@ -60,6 +60,7 @@ struct in_ev {
int
in_buf_pos
;
int
refcnt
;
int
error
;
int
fd
;
};
...
...
loop.c
View file @
0200b514
...
...
@@ -629,9 +629,8 @@ static void event_incoming (struct bufferevent *bev, short what, void *_arg) {
struct
in_ev
*
ev
=
_arg
;
if
(
what
&
(
BEV_EVENT_EOF
|
BEV_EVENT_ERROR
))
{
vlogprintf
(
E_WARNING
,
"Closing incoming connection
\n
"
);
int
fd
=
bufferevent_getfd
(
bev
);
assert
(
fd
>=
0
);
close
(
fd
);
assert
(
ev
->
fd
>=
0
);
close
(
ev
->
fd
);
bufferevent_free
(
bev
);
ev
->
bev
=
0
;
ev
->
refcnt
--
;
...
...
@@ -650,6 +649,7 @@ static void accept_incoming (evutil_socket_t efd, short what, void *arg) {
e
->
refcnt
=
1
;
e
->
in_buf_pos
=
0
;
e
->
error
=
0
;
e
->
fd
=
fd
;
bufferevent_setcb
(
bev
,
read_incoming
,
0
,
event_incoming
,
e
);
bufferevent_enable
(
bev
,
EV_READ
|
EV_WRITE
);
}
...
...
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