git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@999 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-03-31 23:23:10 +00:00
parent cbd2b860ff
commit 703642fbfd
2 changed files with 18 additions and 17 deletions

View File

@ -34,8 +34,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-pc-linux-gnu
host_triplet = i686-pc-linux-gnu
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
noinst_PROGRAMS = example1$(EXEEXT) example2$(EXEEXT) \
example3$(EXEEXT) example4$(EXEEXT)
subdir = examples
@ -114,8 +114,8 @@ INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
IS64BITLINUX_FALSE =
IS64BITLINUX_TRUE = #
IS64BITLINUX_FALSE = #
IS64BITLINUX_TRUE =
LDFLAGS =
LIBOBJS =
LIBS =
@ -170,18 +170,18 @@ am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build = x86_64-unknown-linux-gnu
build_alias =
build_cpu = i686
build_cpu = x86_64
build_os = linux-gnu
build_vendor = pc
build_vendor = unknown
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host = x86_64-unknown-linux-gnu
host_alias =
host_cpu = i686
host_cpu = x86_64
host_os = linux-gnu
host_vendor = pc
host_vendor = unknown
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /usr/src/freeswitch.trunk/libs/jrtplib/install-sh

View File

@ -497,7 +497,9 @@ static switch_status channel_kill_channel(switch_core_session *session, int sig)
if (tech_pvt->dlsession) {
ldl_session_terminate(tech_pvt->dlsession);
}
jrtp4c_killread(tech_pvt->rtp_session);
if (tech_pvt->rtp_session) {
jrtp4c_killread(tech_pvt->rtp_session);
}
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "%s CHANNEL KILL\n", switch_channel_get_name(channel));
}
}
@ -722,8 +724,8 @@ static switch_status channel_write_frame(switch_core_session *session, switch_fr
stun_packet_attribute_add_username(packet, login, 32);
sendto(tech_pvt->rtp_sock, (char *)packet, stun_packet_length(packet), 0 ,(struct sockaddr *)&servaddr, sizeof(servaddr));
//xstun
//printf("SEND STUN REQ %s U=%s to %s:%d\n", packet->header.id, login, tech_pvt->remote_ip, tech_pvt->remote_port);
tech_pvt->stuncount = 75;
//printf("XXXX SEND STUN REQ %s U=%s to %s:%d\n", packet->header.id, login, tech_pvt->remote_ip, tech_pvt->remote_port);
tech_pvt->stuncount = 25;
} else {
tech_pvt->stuncount--;
}
@ -1399,7 +1401,6 @@ static void stun_callback(struct jrtp4c *jrtp4c, jrtp_socket_t sock, void *data,
packet = stun_packet_parse(buf, sizeof(buf));
tech_pvt->last_stun = switch_time_now();
#if 0
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "read %d\ntype: [%s] (0x%04x)\nlength 0x%04x\nid %s\n",
len,
@ -1434,7 +1435,8 @@ static void stun_callback(struct jrtp4c *jrtp4c, jrtp_socket_t sock, void *data,
}
} while (stun_packet_next_attribute(attr));
if (packet->header.type == STUN_BINDING_REQUEST) {
if (packet->header.type == STUN_BINDING_REQUEST && strstr(username,tech_pvt->remote_user)) {
uint8_t buf[512];
stun_packet_t *rpacket;
struct sockaddr_in servaddr;
@ -1442,8 +1444,7 @@ static void stun_callback(struct jrtp4c *jrtp4c, jrtp_socket_t sock, void *data,
servaddr.sin_addr.s_addr = ip;
remote_ip = inet_ntoa(servaddr.sin_addr);
memset(buf, 0, sizeof(buf));
rpacket = stun_packet_build_header(STUN_BINDING_RESPONSE, packet->header.id, buf);
stun_packet_attribute_add_username(rpacket, username, 32);