Changeset 1854 for pjproject/trunk/pjnath/src/pjturn-srv/allocation.c
- Timestamp:
- Mar 9, 2008 11:52:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjturn-srv/allocation.c
r1852 r1854 39 39 #define MAX_LIFETIME 600 40 40 #define DEF_LIFETIME 300 41 42 43 44 /* ChannelData header */45 typedef struct channel_data_hdr46 {47 pj_uint16_t ch_number;48 pj_uint16_t length;49 } channel_data_hdr;50 41 51 42 … … 913 904 * This is not a STUN packet, must be ChannelData packet. 914 905 */ 915 channel_data_hdr *cd = (channel_data_hdr*)pkt->pkt;906 pj_turn_channel_data *cd = (pj_turn_channel_data*)pkt->pkt; 916 907 pj_turn_permission *perm; 917 908 pj_ssize_t len; 909 910 pj_assert(sizeof(*cd)==4); 918 911 919 912 /* For UDP check the packet length */ … … 979 972 if (perm->channel != PJ_TURN_INVALID_CHANNEL) { 980 973 /* Send ChannelData */ 981 channel_data_hdr *cd = (channel_data_hdr*)rel->tp.tx_pkt;974 pj_turn_channel_data *cd = (pj_turn_channel_data*)rel->tp.tx_pkt; 982 975 983 976 if (len > PJ_TURN_MAX_PKT_LEN) { … … 995 988 996 989 /* Copy data */ 997 pj_memcpy(rel->tp.rx_pkt+sizeof( channel_data_hdr), pkt, len);990 pj_memcpy(rel->tp.rx_pkt+sizeof(pj_turn_channel_data), pkt, len); 998 991 999 992 /* Send to client */ 1000 993 pj_turn_listener_sendto(alloc->listener, rel->tp.tx_pkt, 1001 len+sizeof( channel_data_hdr), 0,994 len+sizeof(pj_turn_channel_data), 0, 1002 995 &alloc->hkey.clt_addr, 1003 996 pj_sockaddr_get_len(&alloc->hkey.clt_addr));
Note: See TracChangeset
for help on using the changeset viewer.