Changeset 1924 for pjproject/trunk/pjnath/src/pjturn-srv/allocation.c
- Timestamp:
- Apr 13, 2008 9:48:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjturn-srv/allocation.c
r1913 r1924 826 826 perm->expiry.sec += PJ_TURN_PERM_TIMEOUT; 827 827 828 /* Register to hash table */ 829 pj_hash_set(alloc->pool, alloc->peer_table, &perm->hkey.peer_addr, 830 pj_sockaddr_get_len(&perm->hkey.peer_addr), 0, perm); 828 /* Register to hash table (only the address part!) */ 829 pj_hash_set(alloc->pool, alloc->peer_table, 830 pj_sockaddr_get_addr(&perm->hkey.peer_addr), 831 pj_sockaddr_get_addr_len(&perm->hkey.peer_addr), 0, perm); 831 832 832 833 return perm; … … 846 847 847 848 /* Remove from permission hash table */ 848 pj_hash_set(NULL, alloc->peer_table, &perm->hkey.peer_addr, 849 pj_sockaddr_get_len(&perm->hkey.peer_addr), 0, NULL); 849 pj_hash_set(NULL, alloc->peer_table, 850 pj_sockaddr_get_addr(&perm->hkey.peer_addr), 851 pj_sockaddr_get_addr_len(&perm->hkey.peer_addr), 0, NULL); 850 852 851 853 /* Remove from channel hash table, if assigned a channel number */ … … 866 868 pj_turn_permission *perm; 867 869 870 PJ_UNUSED_ARG(addr_len); 871 868 872 /* Lookup in peer hash table */ 869 perm = (pj_turn_permission*) pj_hash_get(alloc->peer_table, peer_addr, 870 addr_len, NULL); 873 perm = (pj_turn_permission*) 874 pj_hash_get(alloc->peer_table, 875 pj_sockaddr_get_addr(peer_addr), 876 pj_sockaddr_get_addr_len(peer_addr), 877 NULL); 871 878 return perm ? check_permission_expiry(perm) : NULL; 872 879 } … … 921 928 * our stun_on_rx_request() or stun_on_rx_indication() 922 929 * callbacks. 930 * 931 * Note: currently it is necessary to specify the 932 * PJ_STUN_NO_FINGERPRINT_CHECK otherwise the FINGERPRINT 933 * attribute inside STUN Send Indication message will mess up 934 * with fingerprint checking. 923 935 */ 924 unsigned options = PJ_STUN_CHECK_PACKET ;936 unsigned options = PJ_STUN_CHECK_PACKET | PJ_STUN_NO_FINGERPRINT_CHECK; 925 937 unsigned parsed_len = 0; 926 938
Note: See TracChangeset
for help on using the changeset viewer.