static pj_bool_t pjsip_tpmgr_is_tpfactory_valid(pjsip_tpmgr *mgr,
						pjsip_tpfactory *tpf)
{
    pjsip_tpfactory *p;

    pj_lock_acquire(mgr->lock);
    for (p=mgr->factory_list.next; p!=&mgr->factory_list; p=p->next) {
	if (p == tpf) {
	    pj_lock_release(mgr->lock);
	    return PJ_TRUE;
	}
    }
    pj_lock_release(mgr->lock);

    return PJ_FALSE;
}
static pj_bool_t pjsip_tpmgr_is_tpfactory_valid(pjsip_tpmgr *mgr,
						pjsip_tpfactory *tpf)
{
    pjsip_tpfactory *p;

    pj_lock_acquire(mgr->lock);
    for (p=mgr->factory_list.next; p!=&mgr->factory_list; p=p->next) {
	if (p == tpf) {
	    pj_lock_release(mgr->lock);
	    return PJ_TRUE;
	}
    }
    pj_lock_release(mgr->lock);

    return PJ_FALSE;
}