Home
last modified time | relevance | path

Searched refs:err (Results 1 – 25 of 64) sorted by relevance

123

/unit/src/
H A Dnxt_thread_mutex.c83 nxt_err_t err; in nxt_thread_mutex_create() local
87 if (err != 0) { in nxt_thread_mutex_create()
93 if (err != 0) { in nxt_thread_mutex_create()
100 if (err != 0) { in nxt_thread_mutex_create()
106 if (err != 0) { in nxt_thread_mutex_create()
119 nxt_err_t err; in nxt_thread_mutex_destroy() local
122 if (nxt_slow_path(err != 0)) { in nxt_thread_mutex_destroy()
133 nxt_err_t err; in nxt_thread_mutex_lock() local
151 nxt_err_t err; in nxt_thread_mutex_trylock() local
162 if (err == NXT_EBUSY) { in nxt_thread_mutex_trylock()
[all …]
H A Dnxt_thread_cond.c13 nxt_err_t err; in nxt_thread_cond_create() local
15 err = pthread_cond_init(cond, NULL); in nxt_thread_cond_create()
16 if (err == 0) { in nxt_thread_cond_create()
29 nxt_err_t err; in nxt_thread_cond_destroy() local
31 err = pthread_cond_destroy(cond); in nxt_thread_cond_destroy()
32 if (err != 0) { in nxt_thread_cond_destroy()
43 nxt_err_t err; in nxt_thread_cond_signal() local
46 if (nxt_fast_path(err == 0)) { in nxt_thread_cond_signal()
61 nxt_err_t err; in nxt_thread_cond_wait() local
97 if (nxt_fast_path(err == 0 || err == NXT_ETIMEDOUT)) { in nxt_thread_cond_wait()
[all …]
H A Dnxt_dyld.c13 const char *err; in nxt_dyld_load() local
22 err = dlerror(); in nxt_dyld_load()
23 if (err == NULL) { in nxt_dyld_load()
24 err = "(null)"; in nxt_dyld_load()
38 const char *err; in nxt_dyld_symbol() local
56 err = dlerror(); in nxt_dyld_symbol()
57 if (err == NULL) { in nxt_dyld_symbol()
58 err = "(null)"; in nxt_dyld_symbol()
70 const char *err; in nxt_dyld_unload() local
77 err = dlerror(); in nxt_dyld_unload()
[all …]
H A Dnxt_errno.c25 static u_char *nxt_bootstrap_strerror(nxt_err_t err, u_char *errstr,
41 nxt_uint_t err, invalid; in nxt_strerror_start() local
112 for (err = 0; err < nxt_sys_nerr; err++) { in nxt_strerror_start()
113 msg = strerror((int) err); in nxt_strerror_start()
116 nxt_sys_errlist[err].length = length; in nxt_strerror_start()
117 nxt_sys_errlist[err].start = p; in nxt_strerror_start()
122 nxt_sys_errlist[err].length = 13; in nxt_strerror_start()
123 nxt_sys_errlist[err].start = p; in nxt_strerror_start()
135 return nxt_cpystrn(errstr, (u_char *) strerror(err), size); in nxt_bootstrap_strerror()
140 nxt_runtime_strerror(nxt_err_t err, u_char *errstr, size_t size) in nxt_runtime_strerror() argument
[all …]
H A Dnxt_semaphore.c78 nxt_err_t err; in nxt_sem_wait() local
92 err = nxt_errno; in nxt_sem_wait()
101 switch (err) { in nxt_sem_wait()
110 return err; in nxt_sem_wait()
140 err = nxt_errno; in nxt_sem_wait()
149 switch (err) { in nxt_sem_wait()
153 return err; in nxt_sem_wait()
162 return err; in nxt_sem_wait()
218 nxt_err_t err; in nxt_sem_wait() local
220 err = 0; in nxt_sem_wait()
[all …]
H A Dnxt_thread.c23 nxt_err_t err; in nxt_thread_init_data() local
35 if (err != 0) { in nxt_thread_init_data()
56 if (err == 0) { in nxt_thread_init_data()
83 nxt_err_t err; in nxt_thread_create() local
87 if (nxt_fast_path(err == 0)) { in nxt_thread_create()
215 nxt_err_t err; in nxt_thread_cancel() local
219 err = pthread_cancel(handle); in nxt_thread_cancel()
221 if (err != 0) { in nxt_thread_cancel()
230 nxt_err_t err; in nxt_thread_wait() local
234 err = pthread_join(handle, NULL); in nxt_thread_wait()
[all …]
H A Dnxt_conn_write.c189 nxt_err_t err; in nxt_conn_io_sendfile() local
220 switch (err) { in nxt_conn_io_sendfile()
271 int err; in nxt_sendfile() local
286 err = errno; in nxt_sendfile()
288 errno = err; in nxt_sendfile()
301 nxt_err_t err; in nxt_conn_io_writev() local
321 switch (err) { in nxt_conn_io_writev()
348 nxt_err_t err; in nxt_conn_io_send() local
363 switch (err) { in nxt_conn_io_send()
457 nxt_err_t err; in nxt_event_conn_io_writev() local
[all …]
H A Dnxt_linux_sendfile.c52 nxt_err_t err; in nxt_linux_event_conn_io_sendfile() local
105 err = (n == -1) ? nxt_errno : 0; in nxt_linux_event_conn_io_sendfile()
110 switch (err) { in nxt_linux_event_conn_io_sendfile()
120 c->socket.error = err; in nxt_linux_event_conn_io_sendfile()
146 nxt_err_t err; in nxt_linux_send() local
150 err = (n == -1) ? nxt_errno : 0; in nxt_linux_send()
156 switch (err) { in nxt_linux_send()
166 c->socket.error = err; in nxt_linux_send()
192 nxt_err_t err; in nxt_linux_sendmsg() local
211 switch (err) { in nxt_linux_sendmsg()
[all …]
H A Dnxt_socket.c194 nxt_err_t err; in nxt_socket_connect() local
207 switch (err) { in nxt_socket_connect()
250 nxt_err_t err; in nxt_socket_shutdown() local
260 switch (err) { in nxt_socket_shutdown()
285 nxt_err_t err; in nxt_socket_close() local
295 switch (err) { in nxt_socket_close()
320 int ret, err; in nxt_socket_error() local
323 err = 0; in nxt_socket_error()
332 err = nxt_errno; in nxt_socket_error()
335 return err; in nxt_socket_error()
[all …]
H A Dnxt_conn_connect.c124 nxt_err_t err; in nxt_conn_connect_test() local
139 if (err == 0) { in nxt_conn_connect_test()
151 nxt_err_t err; in nxt_conn_connect_error() local
157 err = c->socket.error; in nxt_conn_connect_error()
159 if (err == 0) { in nxt_conn_connect_error()
165 switch (err) { in nxt_conn_connect_error()
190 nxt_err_t err; in nxt_conn_connect_test_error() local
192 err = nxt_socket_error(c->socket.fd); in nxt_conn_connect_test_error()
194 if (err != 0) { in nxt_conn_connect_test_error()
195 c->socket.error = err; in nxt_conn_connect_test_error()
[all …]
H A Dnxt_cyassl.c74 int err; in nxt_cyassl_start() local
88 err = CyaSSL_Init(); in nxt_cyassl_start()
89 if (err != SSL_SUCCESS) { in nxt_cyassl_start()
108 int err; in nxt_cyassl_server_init() local
132 if (err != SSL_SUCCESS) { in nxt_cyassl_server_init()
142 if (err != SSL_SUCCESS) { in nxt_cyassl_server_init()
299 nxt_err_t err; in nxt_cyassl_conn_handshake() local
343 nxt_err_t err; in nxt_cyassl_conn_io_read() local
412 nxt_err_t err; in nxt_cyassl_conn_io_send() local
427 err = 0; in nxt_cyassl_conn_io_send()
[all …]
H A Dnxt_pcre2.c24 nxt_regex_compile(nxt_mp_t *mp, nxt_str_t *source, nxt_regex_err_t *err) in nxt_regex_compile() argument
58 err->offset = erroffset; in nxt_regex_compile()
60 ret = pcre2_get_error_message(errcode, (PCRE2_UCHAR *) err->msg, in nxt_regex_compile()
63 (void) nxt_sprintf(err->msg, err->msg + ERR_BUF_SIZE, in nxt_regex_compile()
74 ret = pcre2_get_error_message(errcode, (PCRE2_UCHAR *) err->msg, in nxt_regex_compile()
77 (void) nxt_sprintf(err->msg, err->msg + ERR_BUF_SIZE, in nxt_regex_compile()
90 err->offset = source->length; in nxt_regex_compile()
91 nxt_memcpy(err->msg, alloc_error, sizeof(alloc_error)); in nxt_regex_compile()
H A Dnxt_conn_read.c135 nxt_err_t err; in nxt_conn_io_recvbuf() local
155 err = (n == -1) ? nxt_socket_errno : 0; in nxt_conn_io_recvbuf()
175 switch (err) { in nxt_conn_io_recvbuf()
178 nxt_debug(c->socket.task, "readv() %E", err); in nxt_conn_io_recvbuf()
187 c->socket.error = err; in nxt_conn_io_recvbuf()
201 nxt_err_t err; in nxt_conn_io_recv() local
206 err = (n == -1) ? nxt_socket_errno : 0; in nxt_conn_io_recv()
231 switch (err) { in nxt_conn_io_recv()
234 nxt_debug(c->socket.task, "recv() %E", err); in nxt_conn_io_recv()
240 nxt_debug(c->socket.task, "recv() %E", err); in nxt_conn_io_recv()
[all …]
H A Dnxt_pcre.c30 nxt_regex_compile(nxt_mp_t *mp, nxt_str_t *source, nxt_regex_err_t *err) in nxt_regex_compile() argument
37 err->offset = source->length; in nxt_regex_compile()
41 err->msg = "memory allocation failed"; in nxt_regex_compile()
60 re->code = pcre_compile(pattern, 0, &err->msg, &erroffset, NULL); in nxt_regex_compile()
63 re->extra = pcre_study(re->code, PCRE_STUDY_JIT_COMPILE, &err->msg); in nxt_regex_compile()
64 if (nxt_slow_path(re->extra == NULL && err->msg != NULL)) { in nxt_regex_compile()
65 nxt_log_warn(thr->log, "pcre_study(%V) failed: %s", source, err->msg); in nxt_regex_compile()
72 err->offset = erroffset; in nxt_regex_compile()
H A Dnxt_gnutls.c56 ssize_t err, const char *fmt, ...);
59 int err, const char *fmt, ...);
226 const char *err; in nxt_gnutls_set_ciphers() local
428 int err; in nxt_gnutls_conn_handshake() local
446 if (err == GNUTLS_E_SUCCESS) { in nxt_gnutls_conn_handshake()
573 int err; in nxt_gnutls_conn_io_shutdown() local
605 if (err == GNUTLS_E_SUCCESS) { in nxt_gnutls_conn_io_shutdown()
637 switch (err) { in nxt_gnutls_conn_test_error()
697 p - msg, msg, err, gnutls_strerror(err)); in nxt_gnutls_conn_log_error()
707 switch (err) { in nxt_gnutls_log_error_level()
[all …]
H A Dnxt_malloc.c132 nxt_err_t err; in nxt_memalign() local
134 err = posix_memalign(&p, alignment, size); in nxt_memalign()
136 if (nxt_fast_path(err == 0)) { in nxt_memalign()
144 alignment, size, err); in nxt_memalign()
185 nxt_err_t err; in nxt_memalign() local
189 err = NXT_EINVAL; in nxt_memalign()
194 err = NXT_EOPNOTSUPP; in nxt_memalign()
221 alignment, size, err); in nxt_memalign()
H A Dnxt_socketpair.c90 nxt_err_t err; in nxt_socketpair_send() local
98 err = (n == -1) ? nxt_socket_errno : 0; in nxt_socketpair_send()
109 switch (err) { in nxt_socketpair_send()
128 ev->fd, fd[0], fd[1], niob, err); in nxt_socketpair_send()
145 nxt_err_t err; in nxt_socketpair_recv() local
150 err = (n == -1) ? nxt_socket_errno : 0; in nxt_socketpair_recv()
168 switch (err) { in nxt_socketpair_recv()
182 ev->fd, niob, err); in nxt_socketpair_recv()
H A Dnxt_errno.h74 #define nxt_set_errno(err) \ argument
75 errno = err
77 #define nxt_set_socket_errno(err) \ argument
78 errno = err
84 typedef u_char *(*nxt_strerror_t)(nxt_err_t err, u_char *errstr, size_t size);
H A Dnxt_aix_send_file.c21 nxt_err_t err; in nxt_aix_event_conn_io_send_file() local
79 err = (n == -1) ? nxt_errno : 0; in nxt_aix_event_conn_io_send_file()
93 switch (err) { in nxt_aix_event_conn_io_send_file()
103 c->socket.error = err; in nxt_aix_event_conn_io_send_file()
104 nxt_log(c->socket.task, nxt_socket_error_level(err), in nxt_aix_event_conn_io_send_file()
106 c->socket.fd, err, fb->file->name, fb->file->fd, fb->file_pos, in nxt_aix_event_conn_io_send_file()
112 nxt_debug(c->socket.task, "sendfile() %E", err); in nxt_aix_event_conn_io_send_file()
H A Dnxt_macosx_sendfile.c34 nxt_err_t err; in nxt_macosx_event_conn_io_sendfile() local
112 err = (n == -1) ? nxt_errno : 0; in nxt_macosx_event_conn_io_sendfile()
117 switch (err) { in nxt_macosx_event_conn_io_sendfile()
127 c->socket.error = err; in nxt_macosx_event_conn_io_sendfile()
128 nxt_log(c->socket.task, nxt_socket_error_level(err), in nxt_macosx_event_conn_io_sendfile()
130 fb->file->fd, c->socket.fd, fb->file_pos, sent, err, in nxt_macosx_event_conn_io_sendfile()
136 nxt_debug(c->socket.task, "sendfile() %E", err); in nxt_macosx_event_conn_io_sendfile()
H A Dnxt_freebsd_sendfile.c39 nxt_err_t err; in nxt_freebsd_event_conn_io_sendfile() local
103 err = (n == -1) ? nxt_errno : 0; in nxt_freebsd_event_conn_io_sendfile()
108 switch (err) { in nxt_freebsd_event_conn_io_sendfile()
118 c->socket.error = err; in nxt_freebsd_event_conn_io_sendfile()
119 nxt_log(c->socket.task, nxt_socket_error_level(err), in nxt_freebsd_event_conn_io_sendfile()
121 fb->file->fd, c->socket.fd, fb->file_pos, file_size, err, in nxt_freebsd_event_conn_io_sendfile()
127 nxt_debug(c->socket.task, "sendfile() %E", err); in nxt_freebsd_event_conn_io_sendfile()
H A Dnxt_solaris_sendfilev.c31 nxt_err_t err; in nxt_solaris_event_conn_io_sendfilev() local
54 err = (n == -1) ? nxt_errno : 0; in nxt_solaris_event_conn_io_sendfilev()
59 switch (err) { in nxt_solaris_event_conn_io_sendfilev()
69 c->socket.error = err; in nxt_solaris_event_conn_io_sendfilev()
70 nxt_log(c->socket.task, nxt_socket_error_level(err), in nxt_solaris_event_conn_io_sendfilev()
71 "sendfilev(%d, %D) failed %E", c->socket.fd, nsfv, err); in nxt_solaris_event_conn_io_sendfilev()
76 nxt_debug(c->socket.task, "sendfilev() %E", err); in nxt_solaris_event_conn_io_sendfilev()
/unit/test/go/ns_inspect/
H A Dapp.go34 func abortonerr(err error) {
35 if err != nil {
36 panic(err)
43 if err != nil {
50 abortonerr(err)
71 err := r.ParseForm()
72 if err != nil {
78 _, err = os.Stat(fname);
79 out.FileExists = err == nil
87 data, err := json.Marshal(out)
[all …]
/unit/go/
H A Dport.go81 c, err := net.FileConn(f)
82 if err != nil {
83 nxt_go_alert("FileConn error %s", err)
158 n, oobn, err := p.snd.WriteMsgUnix(GoBytes(buf, buf_size),
161 if err != nil {
162 nxt_go_warn("write result %d (%d), %s", n, oobn, err)
186 n, oobn, _, _, err := p.rcv.ReadMsgUnix(GoBytes(buf, buf_size),
189 if err != nil {
190 if nerr, ok := err.(*net.OpError); ok {
196 nxt_go_warn("read result %d (%d), %s", n, oobn, err)
H A Drequest.go27 func (r *request) Read(p []byte) (n int, err error) {
41 func new_request(c_req *C.nxt_unit_request_info_t) (r *request, err error) {
46 URL, err := url.ParseRequestURI(uri)
47 if err != nil {
48 return nil, err
114 r, err := new_request(c_req)
116 if err == nil {

123