- Timestamp:
- May 28, 2007 12:58:57 PM (18 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_transport.h
r1269 r1310 606 606 * 607 607 *****************************************************************************/ 608 /** 609 * Type of callback to receive transport operation status. 610 */ 608 611 typedef void (*pjsip_transport_callback)(pjsip_transport *tp, void *token, 609 612 pj_ssize_t sent_bytes); 613 614 /** 615 * This structure describes transport key to be registered to hash table. 616 */ 617 typedef struct pjsip_transport_key 618 { 619 /** 620 * Transport type. 621 */ 622 long type; 623 624 /** 625 * Destination address. 626 */ 627 pj_sockaddr rem_addr; 628 629 } pjsip_transport_key; 630 610 631 /** 611 632 * This structure represent the "public" interface of a SIP transport. … … 624 645 625 646 /** Key for indexing this transport in hash table. */ 626 struct { 627 pjsip_transport_type_e type; /**< Transport type. */ 628 pj_sockaddr rem_addr; /**< Remote addr (zero for UDP) */ 629 } key; 647 pjsip_transport_key key; 630 648 631 649 char *type_name; /**< Type name. */ -
pjproject/trunk/pjsip/src/pjsip/sip_transport.c
r1269 r1310 82 82 }; 83 83 84 /* Key for looking up hash table */85 struct transport_key86 {87 pjsip_transport_type_e type;88 pj_sockaddr addr;89 };90 84 91 85 /***************************************************************************** … … 1352 1346 * In this case, lookup the transport from the hash table. 1353 1347 */ 1354 structtransport_key key;1348 pjsip_transport_key key; 1355 1349 int key_len; 1356 1350 pjsip_transport *transport; 1357 1351 1352 pj_bzero(&key, sizeof(key)); 1358 1353 key_len = sizeof(key.type) + addr_len; 1359 1354 1360 1355 /* First try to get exact destination. */ 1361 1356 key.type = type; 1362 pj_memcpy(&key. addr, remote, addr_len);1357 pj_memcpy(&key.rem_addr, remote, addr_len); 1363 1358 1364 1359 transport = (pjsip_transport*) … … 1372 1367 type == PJSIP_TRANSPORT_LOOP_DGRAM) 1373 1368 { 1374 pj_sockaddr_in *addr = (pj_sockaddr_in*)&key. addr;1369 pj_sockaddr_in *addr = (pj_sockaddr_in*)&key.rem_addr; 1375 1370 1376 1371 pj_bzero(addr, sizeof(pj_sockaddr_in)); … … 1384 1379 (remote_addr->addr.sa_family == PJ_AF_INET)) 1385 1380 { 1386 pj_sockaddr_in *addr = (pj_sockaddr_in*)&key. addr;1381 pj_sockaddr_in *addr = (pj_sockaddr_in*)&key.rem_addr; 1387 1382 1388 1383 pj_bzero(addr, sizeof(pj_sockaddr_in));
Note: See TracChangeset
for help on using the changeset viewer.