mirror of
https://github.com/coturn/coturn.git
synced 2025-05-14 09:36:49 +08:00
working on uclient
This commit is contained in:
parent
1ab7628cc1
commit
40ec5fae5b
@ -1,5 +1,5 @@
|
||||
11/07/2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
Version 4.2.2.3 'Monza':
|
||||
Version 4.2.3.1 'Monza':
|
||||
- Request re-transmission implemented in uclient test program.
|
||||
- TLS connection procedure improved in uclient test program.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# Common settings script.
|
||||
|
||||
TURNVERSION=4.2.2.3
|
||||
TURNVERSION=4.2.3.1
|
||||
BUILDDIR=~/rpmbuild
|
||||
ARCH=`uname -p`
|
||||
TURNSERVER_SVN_URL=http://coturn.googlecode.com/svn
|
||||
|
@ -1,5 +1,5 @@
|
||||
Name: turnserver
|
||||
Version: 4.2.2.3
|
||||
Version: 4.2.3.1
|
||||
Release: 0%{dist}
|
||||
Summary: Coturn TURN Server
|
||||
|
||||
@ -295,7 +295,7 @@ fi
|
||||
|
||||
%changelog
|
||||
* Thu Nov 07 2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
- Sync to 4.2.2.3
|
||||
- Sync to 4.2.3.1
|
||||
* Sun Oct 26 2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
- Sync to 4.2.2.2
|
||||
* Sun Oct 05 2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
|
@ -308,28 +308,52 @@ int send_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int data_con
|
||||
|
||||
static int wait_fd(int fd, unsigned int cycle) {
|
||||
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd,&fds);
|
||||
if(fd>=(int)FD_SETSIZE) {
|
||||
return 1;
|
||||
} else {
|
||||
fd_set fds;
|
||||
FD_ZERO(&fds);
|
||||
FD_SET(fd,&fds);
|
||||
|
||||
if(dos && cycle==0)
|
||||
return 0;
|
||||
if(dos && cycle==0)
|
||||
return 0;
|
||||
|
||||
struct timeval timeout = {0,0};
|
||||
if(cycle == 0)
|
||||
timeout.tv_usec = 500000;
|
||||
else {
|
||||
timeout.tv_sec = 1;
|
||||
while(--cycle) timeout.tv_sec = timeout.tv_sec + timeout.tv_sec;
|
||||
struct timeval start_time;
|
||||
struct timeval ctime;
|
||||
gettimeofday(&start_time,NULL);
|
||||
|
||||
ctime.tv_sec = start_time.tv_sec;
|
||||
ctime.tv_usec = start_time.tv_usec;
|
||||
|
||||
int rc = 0;
|
||||
|
||||
do {
|
||||
struct timeval timeout = {0,0};
|
||||
if(cycle == 0) {
|
||||
timeout.tv_usec = 500000;
|
||||
} else {
|
||||
|
||||
timeout.tv_sec = 1;
|
||||
while(--cycle) timeout.tv_sec = timeout.tv_sec + timeout.tv_sec;
|
||||
|
||||
if(ctime.tv_sec > start_time.tv_sec) {
|
||||
if(ctime.tv_sec >= start_time.tv_sec + timeout.tv_sec) {
|
||||
break;
|
||||
} else {
|
||||
timeout.tv_sec -= (ctime.tv_sec - start_time.tv_sec);
|
||||
}
|
||||
}
|
||||
}
|
||||
rc = select(fd+1,&fds,NULL,NULL,&timeout);
|
||||
if((rc<0) && (errno == EINTR)) {
|
||||
gettimeofday(&ctime,NULL);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
} while(1);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int rc = 0;
|
||||
|
||||
do {
|
||||
rc = select(fd+1,&fds,NULL,NULL,&timeout);
|
||||
} while((rc<0) && (errno == EINTR));
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
int recv_buffer(app_ur_conn_info *clnet_info, stun_buffer* message, int sync, int data_connection, app_tcp_conn_info *atc, stun_buffer* request_message) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
#ifndef __IOADEFS__
|
||||
#define __IOADEFS__
|
||||
|
||||
#define TURN_SERVER_VERSION "4.2.2.3"
|
||||
#define TURN_SERVER_VERSION "4.2.3.1"
|
||||
#define TURN_SERVER_VERSION_NAME "Monza"
|
||||
#define TURN_SOFTWARE "Coturn-" TURN_SERVER_VERSION " '" TURN_SERVER_VERSION_NAME "'"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user