Lines Matching refs:es

26 void OSSL_ERR_STATE_save(ERR_STATE *es)  in OSSL_ERR_STATE_save()  argument
31 if (es == NULL) in OSSL_ERR_STATE_save()
35 err_clear(es, i, 1); in OSSL_ERR_STATE_save()
41 memcpy(es, thread_es, sizeof(*es)); in OSSL_ERR_STATE_save()
46 void OSSL_ERR_STATE_save_to_mark(ERR_STATE *es) in OSSL_ERR_STATE_save_to_mark() argument
52 if (es == NULL) in OSSL_ERR_STATE_save_to_mark()
58 err_clear(es, i, 1); in OSSL_ERR_STATE_save_to_mark()
60 es->top = es->bottom = 0; in OSSL_ERR_STATE_save_to_mark()
75 err_clear(es, i, 1); in OSSL_ERR_STATE_save_to_mark()
78 es->err_flags[i] = thread_es->err_flags[j]; in OSSL_ERR_STATE_save_to_mark()
79 es->err_marks[i] = 0; in OSSL_ERR_STATE_save_to_mark()
80 es->err_buffer[i] = thread_es->err_buffer[j]; in OSSL_ERR_STATE_save_to_mark()
81 es->err_data[i] = thread_es->err_data[j]; in OSSL_ERR_STATE_save_to_mark()
82 es->err_data_size[i] = thread_es->err_data_size[j]; in OSSL_ERR_STATE_save_to_mark()
83 es->err_data_flags[i] = thread_es->err_data_flags[j]; in OSSL_ERR_STATE_save_to_mark()
84 es->err_file[i] = thread_es->err_file[j]; in OSSL_ERR_STATE_save_to_mark()
85 es->err_line[i] = thread_es->err_line[j]; in OSSL_ERR_STATE_save_to_mark()
86 es->err_func[i] = thread_es->err_func[j]; in OSSL_ERR_STATE_save_to_mark()
101 es->top = i - 1; in OSSL_ERR_STATE_save_to_mark()
102 es->bottom = ERR_NUM_ERRORS - 1; in OSSL_ERR_STATE_save_to_mark()
105 es->top = es->bottom = 0; in OSSL_ERR_STATE_save_to_mark()
110 err_clear(es, i, 1); in OSSL_ERR_STATE_save_to_mark()
113 void OSSL_ERR_STATE_restore(const ERR_STATE *es) in OSSL_ERR_STATE_restore() argument
118 if (es == NULL || es->bottom == es->top) in OSSL_ERR_STATE_restore()
125 for (i = (size_t)es->bottom; i != (size_t)es->top;) { in OSSL_ERR_STATE_restore()
129 if ((es->err_flags[i] & ERR_FLAG_CLEAR) != 0) in OSSL_ERR_STATE_restore()
136 thread_es->err_flags[top] = es->err_flags[i]; in OSSL_ERR_STATE_restore()
137 thread_es->err_buffer[top] = es->err_buffer[i]; in OSSL_ERR_STATE_restore()
139 err_set_debug(thread_es, top, es->err_file[i], es->err_line[i], in OSSL_ERR_STATE_restore()
140 es->err_func[i]); in OSSL_ERR_STATE_restore()
142 if (es->err_data[i] != NULL && es->err_data_size[i] != 0) { in OSSL_ERR_STATE_restore()
144 size_t data_sz = es->err_data_size[i]; in OSSL_ERR_STATE_restore()
148 memcpy(data, es->err_data[i], data_sz); in OSSL_ERR_STATE_restore()
150 es->err_data_flags[i] | ERR_TXT_MALLOCED); in OSSL_ERR_STATE_restore()