Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0018aa1d
Commit
0018aa1d
authored
Nov 07, 2006
by
thek@kpdesk.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge kpdesk.mysql.com:/home/thek/dev/mysql-4.0-maint
into kpdesk.mysql.com:/home/thek/dev/mysql-4.0
parents
05e3b5f8
141fc69e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
11 deletions
+26
-11
include/violite.h
include/violite.h
+3
-3
libmysqld/lib_vio.c
libmysqld/lib_vio.c
+1
-0
sql/net_serv.cc
sql/net_serv.cc
+2
-2
vio/viosocket.c
vio/viosocket.c
+20
-6
No files found.
include/violite.h
View file @
0018aa1d
...
...
@@ -77,7 +77,7 @@ my_bool vio_peer_addr(Vio* vio, char *buf, uint16 *port);
/* Remotes in_addr */
void
vio_in_addr
(
Vio
*
vio
,
struct
in_addr
*
in
);
my_bool
vio_poll_read
(
Vio
*
vio
,
uint
timeout
);
void
vio_timeout
(
Vio
*
vio
,
uint
timeout
);
void
vio_timeout
(
Vio
*
vio
,
uint
which
,
uint
timeout
);
#ifdef HAVE_OPENSSL
#include <openssl/opensslv.h>
...
...
@@ -140,7 +140,7 @@ Vio *new_VioSSL(struct st_VioSSLAcceptorFd *fd, Vio *sd, int state);
#define vio_close(vio) ((vio)->vioclose)(vio)
#define vio_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
#define vio_timeout(vio,
seconds) (vio)->timeout(vio
, seconds)
#define vio_timeout(vio,
which, seconds) (vio)->timeout(vio, which
, seconds)
#endif
/* defined(HAVE_VIO) && !defined(DONT_MAP_VIO) */
/* This enumerator is used in parser - should be always visible */
...
...
@@ -180,7 +180,7 @@ struct st_vio
my_bool
(
*
should_retry
)(
Vio
*
);
my_bool
(
*
was_interrupted
)(
Vio
*
);
int
(
*
vioclose
)(
Vio
*
);
void
(
*
timeout
)(
Vio
*
,
unsigned
int
timeout
);
void
(
*
timeout
)(
Vio
*
,
unsigned
int
which
,
unsigned
int
timeout
);
void
*
ssl_arg
;
#endif
/* HAVE_VIO */
};
...
...
libmysqld/lib_vio.c
View file @
0018aa1d
...
...
@@ -229,6 +229,7 @@ my_bool vio_poll_read(Vio *vio,uint timeout)
void
vio_timeout
(
Vio
*
vio
__attribute__
((
unused
)),
uint
which
__attribute__
((
unused
)),
uint
timeout
__attribute__
((
unused
)))
{
}
...
...
sql/net_serv.cc
View file @
0018aa1d
...
...
@@ -436,7 +436,7 @@ net_real_write(NET *net,const char *packet,ulong len)
thr_alarm
(
&
alarmed
,(
uint
)
net
->
write_timeout
,
&
alarm_buff
);
#else
alarmed
=
0
;
vio_timeout
(
net
->
vio
,
net
->
write_timeout
);
vio_timeout
(
net
->
vio
,
1
,
net
->
write_timeout
);
#endif
/* NO_ALARM */
pos
=
(
char
*
)
packet
;
end
=
pos
+
len
;
...
...
@@ -627,7 +627,7 @@ my_real_read(NET *net, ulong *complen)
if
(
net_blocking
)
thr_alarm
(
&
alarmed
,
net
->
read_timeout
,
&
alarm_buff
);
#else
vio_timeout
(
net
->
vio
,
net
->
read_timeout
);
vio_timeout
(
net
->
vio
,
0
,
net
->
read_timeout
);
#endif
/* NO_ALARM */
pos
=
net
->
buff
+
net
->
where_b
;
/* net->packet -4 */
...
...
vio/viosocket.c
View file @
0018aa1d
...
...
@@ -345,12 +345,26 @@ my_bool vio_poll_read(Vio *vio,uint timeout)
}
void
vio_timeout
(
Vio
*
vio
__attribute__
((
unused
)),
uint
timeout
__attribute__
((
unused
)))
void
vio_timeout
(
Vio
*
vio
,
uint
which
,
uint
timeout
)
{
#if defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO)
#ifdef __WIN__
ulong
wait_timeout
=
(
ulong
)
timeout
*
1000
;
(
void
)
setsockopt
(
vio
->
sd
,
SOL_SOCKET
,
SO_RCVTIMEO
,
(
char
*
)
&
wait_timeout
,
sizeof
(
wait_timeout
));
#endif
/* __WIN__ */
/* Windows expects time in milliseconds as int. */
int
wait_timeout
=
(
int
)
timeout
*
1000
;
#else
/* ! __WIN__ */
/* POSIX specifies time as struct timeval. */
struct
timeval
wait_timeout
;
wait_timeout
.
tv_sec
=
timeout
;
wait_timeout
.
tv_usec
=
0
;
#endif
/* ! __WIN__ */
(
void
)
setsockopt
(
vio
->
sd
,
SOL_SOCKET
,
which
?
SO_SNDTIMEO
:
SO_RCVTIMEO
,
(
char
*
)
&
wait_timeout
,
sizeof
(
wait_timeout
));
#endif
/* defined(SO_SNDTIMEO) && defined(SO_RCVTIMEO) */
}
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