library/src/blockclass/BP-BlockClass.cc
// attach regexp tests to http session
attach regexp tests to http session
attach regexp tests to http session
BP_ERROR_T Block::attachJITRegexpTestRecordsToHttpSession()
{
	if(!this->web_request_jit_match_set)
		return ERR_FAILURE;
	if(!this->web_request_jit_match_n)
		return ERR_FAILURE;
	if(!this->httpSession)
		return ERR_FAILURE;
	this->httpSession->jit_pcre_regexp_checks  = (P_BP_PCRE_JIT_MATCH_ENTRY) memdup((void *) this->web_request_jit_match_set, sizeof(BP_PCRE_JIT_MATCH_ENTRY) * this->web_request_jit_match_n);
	this->httpSession->jit_pcre_regexp_check_n = this->web_request_jit_match_n;
	return ERR_SUCCESS;
}
BP_ERROR_T Block :: attachJITRegexpTestRecordsToHttpSession ( ) { if ( ! this -> web_request_jit_match_set ) return ERR_FAILURE ; if ( ! this -> web_request_jit_match_n ) return ERR_FAILURE ; if ( ! this -> httpSession ) return ERR_FAILURE ; this -> httpSession -> jit_pcre_regexp_checks = ( P_BP_PCRE_JIT_MATCH_ENTRY ) memdup ( ( void * ) this -> web_request_jit_match_set , sizeof ( BP_PCRE_JIT_MATCH_ENTRY ) * this -> web_request_jit_match_n ) ; this -> httpSession -> jit_pcre_regexp_check_n = this -> web_request_jit_match_n ; return ERR_SUCCESS ; }
attach regexp tests to http session
attach regexp tests to http session
// set in http session (memory is duplicated) and set check directly // return indicating success