Changeset 4862 for pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
- Timestamp:
- Jun 19, 2014 9:42:02 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c
r4860 r4862 1694 1694 asock_cfg.concurrency = ssock->param.concurrency; 1695 1695 asock_cfg.whole_data = PJ_TRUE; 1696 1697 /* If listener socket has group lock, automatically create group lock 1698 * for the new socket. 1699 */ 1700 if (ssock_parent->param.grp_lock) { 1701 pj_grp_lock_t *glock; 1702 1703 status = pj_grp_lock_create(ssock->pool, NULL, &glock); 1704 if (status != PJ_SUCCESS) 1705 goto on_return; 1706 1707 /* Temporarily add ref the group lock until active socket creation, 1708 * to make sure that group lock is destroyed if the active socket 1709 * creation fails. 1710 */ 1711 pj_grp_lock_add_ref(glock); 1712 asock_cfg.grp_lock = ssock->param.grp_lock = glock; 1713 } 1696 1714 1697 1715 pj_bzero(&asock_cb, sizeof(asock_cb)); … … 1707 1725 ssock, 1708 1726 &ssock->asock); 1727 1728 /* This will destroy the group lock if active socket creation fails */ 1729 if (asock_cfg.grp_lock) { 1730 pj_grp_lock_dec_ref(asock_cfg.grp_lock); 1731 } 1709 1732 1710 1733 if (status != PJ_SUCCESS) … … 2122 2145 /* Last known OpenSSL error code */ 2123 2146 info->last_native_err = ssock->last_err; 2147 2148 /* Group lock */ 2149 info->grp_lock = ssock->param.grp_lock; 2124 2150 2125 2151 return PJ_SUCCESS; … … 2489 2515 asock_cfg.concurrency = ssock->param.concurrency; 2490 2516 asock_cfg.whole_data = PJ_TRUE; 2517 asock_cfg.grp_lock = ssock->param.grp_lock; 2491 2518 2492 2519 pj_bzero(&asock_cb, sizeof(asock_cb)); … … 2575 2602 asock_cfg.concurrency = ssock->param.concurrency; 2576 2603 asock_cfg.whole_data = PJ_TRUE; 2604 asock_cfg.grp_lock = ssock->param.grp_lock; 2577 2605 2578 2606 pj_bzero(&asock_cb, sizeof(asock_cb));
Note: See TracChangeset
for help on using the changeset viewer.