Changeset 5564
- Timestamp:
- Mar 8, 2017 4:33:47 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_transport.c
r5559 r5564 254 254 { 255 255 unsigned i; 256 pjsip_transport_type_e parent = 0; 256 257 257 258 PJ_ASSERT_RETURN(tp_flag && tp_name && def_port, PJ_EINVAL); … … 261 262 262 263 for (i=1; i<PJ_ARRAY_SIZE(transport_names); ++i) { 264 if (tp_flag & PJSIP_TRANSPORT_IPV6 && 265 pj_stricmp2(&transport_names[i].name, tp_name) == 0) 266 { 267 parent = transport_names[i].type; 268 } 263 269 if (transport_names[i].type == 0) 264 270 break; … … 268 274 return PJ_ETOOMANY; 269 275 270 transport_names[i].type = (pjsip_transport_type_e)i; 276 if (tp_flag & PJSIP_TRANSPORT_IPV6 && parent) { 277 transport_names[i].type = parent | PJSIP_TRANSPORT_IPV6; 278 } else { 279 transport_names[i].type = (pjsip_transport_type_e)i; 280 } 281 271 282 transport_names[i].port = (pj_uint16_t)def_port; 272 283 pj_ansi_strcpy(transport_names[i].name_buf, tp_name); … … 275 286 276 287 if (p_tp_type) 277 *p_tp_type = i;288 *p_tp_type = transport_names[i].type; 278 289 279 290 return PJ_SUCCESS;
Note: See TracChangeset
for help on using the changeset viewer.