Exemplo n.º 1
0
void wi_error_enter_thread(void) {
	wi_error_t		*error;

	error = _wi_error_init(_wi_error_alloc());
	wi_dictionary_set_data_for_key(wi_thread_dictionary(), error, WI_STR(_WI_ERROR_THREAD_KEY));
	wi_release(error);
	
	wi_error_set_error(WI_ERROR_DOMAIN_NONE, WI_ERROR_NONE);
}
Exemplo n.º 2
0
static wi_error_t * _wi_get_error(void) {
	wi_error_t		*error;
	
	error = wi_dictionary_data_for_key(wi_thread_dictionary(), WI_STR(_WI_ERROR_THREAD_KEY));

	WI_ASSERT(error != NULL, "no wi_error_t created for thread", 0);
	
	return error;
}
Exemplo n.º 3
0
void wi_error_enter_thread(void) {
	wi_error_t		*error;

	error = _wi_error_init(_wi_error_alloc());
	wi_mutable_dictionary_set_data_for_key(wi_thread_dictionary(), error, WI_STR(_WI_ERROR_THREAD_KEY));
	wi_release(error);
	
	wi_error_set_error(WI_ERROR_DOMAIN_NONE, WI_ERROR_NONE);
	
#ifdef WI_LIBXML2
	xmlSetGenericErrorFunc(NULL, _wi_error_xml_error_handler);
#endif
}
Exemplo n.º 4
0
wd_user_t * wd_users_user_for_thread(void) {
	return wi_dictionary_data_for_key(wi_thread_dictionary(), WI_STR(WD_USERS_THREAD_KEY));
}
Exemplo n.º 5
0
void wd_users_set_user_for_thread(wd_user_t *user) {
	wi_dictionary_set_data_for_key(wi_thread_dictionary(), user, WI_STR(WD_USERS_THREAD_KEY));
}
Exemplo n.º 6
0
void wi_thread_exit_thread(void) {
	wi_socket_exit_thread();
	
	wi_release(wi_thread_dictionary());
	wi_release(wi_thread_current_thread());
}