MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / lookup

Method lookup

extra/yassl/src/yassl_int.cpp:1810–1827  ·  view source on GitHub ↗

lookup session by id, return a copy if space provided

Source from the content-addressed store, hash-verified

1808
1809// lookup session by id, return a copy if space provided
1810SSL_SESSION* Sessions::lookup(const opaque* id, SSL_SESSION* copy)
1811{
1812 Lock guard(mutex_);
1813 sess_iterator find = STL::find_if(list_.begin(), list_.end(),
1814 sess_match(id));
1815 if (find != list_.end()) {
1816 uint current = lowResTimer();
1817 if ( ((*find)->GetBornOn() + (*find)->GetTimeOut()) < current) {
1818 del_ptr_zero()(*find);
1819 list_.erase(find);
1820 return 0;
1821 }
1822 if (copy)
1823 *copy = *(*find);
1824 return *find;
1825 }
1826 return 0;
1827}
1828
1829
1830// remove a session by id

Callers 3

ProcessMethod · 0.80
set_sessionMethod · 0.80
SSL_get_sessionFunction · 0.80

Calls 9

find_ifFunction · 0.85
sess_matchClass · 0.85
lowResTimerFunction · 0.85
del_ptr_zeroClass · 0.85
GetBornOnMethod · 0.80
GetTimeOutMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected