Skip to content

Commit 3860bd1

Browse files
committed
rename exit again
1 parent 5d9dc40 commit 3860bd1

File tree

9 files changed

+134
-134
lines changed

9 files changed

+134
-134
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: nanonext
22
Type: Package
33
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
4-
Version: 1.3.0.9005
4+
Version: 1.3.0.9006
55
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
66
a socket library implementing 'Scalability Protocols', a reliable,
77
high-performance standard for common communications patterns including

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# nanonext 1.3.0.9005 (development)
1+
# nanonext 1.3.0.9006 (development)
22

33
#### Updates
44

src/aio.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ SEXP rnng_send_aio(SEXP con, SEXP data, SEXP mode, SEXP timeout, SEXP clo) {
435435
if ((xc = nng_msg_alloc(&msg, 0)) ||
436436
(xc = nng_msg_append(msg, buf.buf, buf.cur)) ||
437437
(xc = nng_aio_alloc(&saio->aio, saio_complete, saio)))
438-
goto fail;
438+
goto exit;
439439

440440
nng_aio_set_msg(saio->aio, msg);
441441
nng_aio_set_timeout(saio->aio, dur);
@@ -463,7 +463,7 @@ SEXP rnng_send_aio(SEXP con, SEXP data, SEXP mode, SEXP timeout, SEXP clo) {
463463

464464
if ((xc = nng_aio_alloc(&saio->aio, isaio_complete, saio)) ||
465465
(xc = nng_aio_set_iov(saio->aio, 1u, &iov)))
466-
goto fail;
466+
goto exit;
467467

468468
nng_aio_set_timeout(saio->aio, dur);
469469
nng_stream_send(sp, saio->aio);
@@ -485,7 +485,7 @@ SEXP rnng_send_aio(SEXP con, SEXP data, SEXP mode, SEXP timeout, SEXP clo) {
485485
if ((xc = nng_msg_alloc(&msg, 0)) ||
486486
(xc = nng_msg_append(msg, buf.buf, buf.cur)) ||
487487
(xc = nng_aio_alloc(&saio->aio, saio_complete, saio)))
488-
goto fail;
488+
goto exit;
489489

490490
nng_msg_set_pipe(msg, *p);
491491
nng_aio_set_msg(saio->aio, msg);
@@ -510,7 +510,7 @@ SEXP rnng_send_aio(SEXP con, SEXP data, SEXP mode, SEXP timeout, SEXP clo) {
510510
UNPROTECT(3);
511511
return env;
512512

513-
fail:
513+
exit:
514514
if (saio->aio) nng_aio_free(saio->aio);
515515
R_Free(saio->data);
516516
if (msg) nng_msg_free(msg);
@@ -540,7 +540,7 @@ SEXP rnng_recv_aio(SEXP con, SEXP mode, SEXP timeout, SEXP cvar, SEXP bytes, SEX
540540
raio->cb = NULL;
541541

542542
if ((xc = nng_aio_alloc(&raio->aio, signal ? raio_complete_signal : raio_complete, raio)))
543-
goto fail;
543+
goto exit;
544544

545545
nng_aio_set_timeout(raio->aio, dur);
546546
sock ? nng_recv_aio(*(nng_socket *) NANO_PTR(con), raio->aio) :
@@ -567,7 +567,7 @@ SEXP rnng_recv_aio(SEXP con, SEXP mode, SEXP timeout, SEXP cvar, SEXP bytes, SEX
567567

568568
if ((xc = nng_aio_alloc(&raio->aio, signal ? iraio_complete_signal : iraio_complete, raio)) ||
569569
(xc = nng_aio_set_iov(raio->aio, 1u, &iov)))
570-
goto fail;
570+
goto exit;
571571

572572
nng_aio_set_timeout(raio->aio, dur);
573573
nng_stream_recv(*sp, raio->aio);
@@ -589,7 +589,7 @@ SEXP rnng_recv_aio(SEXP con, SEXP mode, SEXP timeout, SEXP cvar, SEXP bytes, SEX
589589
UNPROTECT(3);
590590
return env;
591591

592-
fail:
592+
exit:
593593
if (raio->aio) nng_aio_free(raio->aio);
594594
R_Free(raio->data);
595595
R_Free(raio);

src/comms.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ SEXP rnng_dial(SEXP socket, SEXP url, SEXP tls, SEXP autostart, SEXP error) {
123123
(xc = nng_url_parse(&up, ur)) ||
124124
(xc = nng_tls_config_server_name(cfg, up->u_hostname)) ||
125125
(xc = nng_dialer_set_ptr(*dp, NNG_OPT_TLS_CONFIG, cfg)))
126-
goto fail;
126+
goto exit;
127127
if (start && (xc = nng_dialer_start(*dp, start == 1 ? NNG_FLAG_NONBLOCK : 0)))
128-
goto fail;
128+
goto exit;
129129
nng_url_free(up);
130130
nng_tls_config_hold(cfg);
131131

@@ -137,7 +137,7 @@ SEXP rnng_dial(SEXP socket, SEXP url, SEXP tls, SEXP autostart, SEXP error) {
137137
} else {
138138

139139
if ((xc = start ? nng_dial(*sock, ur, dp, start == 1 ? NNG_FLAG_NONBLOCK : 0) : nng_dialer_create(dp, *sock, ur)))
140-
goto fail;
140+
goto exit;
141141

142142
PROTECT(dialer = R_MakeExternalPtr(dp, nano_DialerSymbol, R_NilValue));
143143

@@ -162,7 +162,7 @@ SEXP rnng_dial(SEXP socket, SEXP url, SEXP tls, SEXP autostart, SEXP error) {
162162
UNPROTECT(2);
163163
return nano_success;
164164

165-
fail:
165+
exit:
166166
if (up) nng_url_free(up);
167167
R_Free(dp);
168168
if (NANO_INTEGER(error)) ERROR_OUT(xc);
@@ -194,9 +194,9 @@ SEXP rnng_listen(SEXP socket, SEXP url, SEXP tls, SEXP autostart, SEXP error) {
194194
(xc = nng_url_parse(&up, ur)) ||
195195
(xc = nng_tls_config_server_name(cfg, up->u_hostname)) ||
196196
(xc = nng_listener_set_ptr(*lp, NNG_OPT_TLS_CONFIG, cfg)))
197-
goto fail;
197+
goto exit;
198198
if (start && (xc = nng_listener_start(*lp, 0)))
199-
goto fail;
199+
goto exit;
200200
nng_url_free(up);
201201
nng_tls_config_hold(cfg);
202202

@@ -208,7 +208,7 @@ SEXP rnng_listen(SEXP socket, SEXP url, SEXP tls, SEXP autostart, SEXP error) {
208208
} else {
209209

210210
if ((xc = start ? nng_listen(*sock, ur, lp, 0) : nng_listener_create(lp, *sock, ur)))
211-
goto fail;
211+
goto exit;
212212

213213
PROTECT(listener = R_MakeExternalPtr(lp, nano_ListenerSymbol, R_NilValue));
214214

@@ -234,7 +234,7 @@ SEXP rnng_listen(SEXP socket, SEXP url, SEXP tls, SEXP autostart, SEXP error) {
234234
UNPROTECT(2);
235235
return nano_success;
236236

237-
fail:
237+
exit:
238238
if (up) nng_url_free(up);
239239
R_Free(lp);
240240
if (NANO_INTEGER(error)) ERROR_OUT(xc);
@@ -316,14 +316,14 @@ SEXP rnng_send(SEXP con, SEXP data, SEXP mode, SEXP block) {
316316
if (flags <= 0) {
317317

318318
if ((xc = nng_send(*sock, buf.buf, buf.cur, flags ? NNG_FLAG_NONBLOCK : (NANO_INTEGER(block) != 1) * NNG_FLAG_NONBLOCK)))
319-
goto fail;
319+
goto exit;
320320

321321
} else {
322322

323323
if ((xc = nng_msg_alloc(&msgp, 0)) ||
324324
(xc = nng_msg_append(msgp, buf.buf, buf.cur)) ||
325325
(xc = nng_aio_alloc(&aiop, NULL, NULL)))
326-
goto fail;
326+
goto exit;
327327

328328
nng_aio_set_msg(aiop, msgp);
329329
nng_aio_set_timeout(aiop, flags);
@@ -345,14 +345,14 @@ SEXP rnng_send(SEXP con, SEXP data, SEXP mode, SEXP block) {
345345
if ((xc = nng_msg_alloc(&msgp, 0)) ||
346346
(xc = nng_msg_append(msgp, buf.buf, buf.cur)) ||
347347
(xc = nng_ctx_sendmsg(*ctxp, msgp, flags ? NNG_FLAG_NONBLOCK : (NANO_INTEGER(block) != 1) * NNG_FLAG_NONBLOCK)))
348-
goto fail;
348+
goto exit;
349349

350350
} else {
351351

352352
if ((xc = nng_msg_alloc(&msgp, 0)) ||
353353
(xc = nng_msg_append(msgp, buf.buf, buf.cur)) ||
354354
(xc = nng_aio_alloc(&aiop, NULL, NULL)))
355-
goto fail;
355+
goto exit;
356356

357357
nng_aio_set_msg(aiop, msgp);
358358
nng_aio_set_timeout(aiop, flags);
@@ -377,7 +377,7 @@ SEXP rnng_send(SEXP con, SEXP data, SEXP mode, SEXP block) {
377377

378378
if ((xc = nng_aio_alloc(&aiop, NULL, NULL)) ||
379379
(xc = nng_aio_set_iov(aiop, 1u, &iov)))
380-
goto fail;
380+
goto exit;
381381

382382
nng_aio_set_timeout(aiop, flags ? flags : (NANO_INTEGER(block) != 0) * NNG_DURATION_DEFAULT);
383383
nng_stream_send(sp, aiop);
@@ -396,7 +396,7 @@ SEXP rnng_send(SEXP con, SEXP data, SEXP mode, SEXP block) {
396396

397397
return nano_success;
398398

399-
fail:
399+
exit:
400400
if (aiop) nng_aio_free(aiop);
401401
if (msgp) nng_msg_free(msgp);
402402
NANO_FREE(buf);
@@ -422,20 +422,20 @@ SEXP rnng_recv(SEXP con, SEXP mode, SEXP block, SEXP bytes) {
422422
if (flags <= 0) {
423423

424424
if ((xc = nng_recv(*sock, &buf, &sz, NNG_FLAG_ALLOC + (flags < 0 || NANO_INTEGER(block) != 1) * NNG_FLAG_NONBLOCK)))
425-
goto fail;
425+
goto exit;
426426

427427
res = nano_decode(buf, sz, mod, NANO_PROT(con));
428428
nng_free(buf, sz);
429429

430430
} else {
431431

432432
if ((xc = nng_aio_alloc(&aiop, NULL, NULL)))
433-
goto fail;
433+
goto exit;
434434
nng_aio_set_timeout(aiop, flags);
435435
nng_recv_aio(*sock, aiop);
436436
nng_aio_wait(aiop);
437437
if ((xc = nng_aio_result(aiop)))
438-
goto fail;
438+
goto exit;
439439
nng_msg *msgp = nng_aio_get_msg(aiop);
440440
nng_aio_free(aiop);
441441
buf = nng_msg_body(msgp);
@@ -453,7 +453,7 @@ SEXP rnng_recv(SEXP con, SEXP mode, SEXP block, SEXP bytes) {
453453
if (flags <= 0) {
454454

455455
if ((xc = nng_ctx_recvmsg(*ctxp, &msgp, (flags < 0 || NANO_INTEGER(block) != 1) * NNG_FLAG_NONBLOCK)))
456-
goto fail;
456+
goto exit;
457457

458458
buf = nng_msg_body(msgp);
459459
sz = nng_msg_len(msgp);
@@ -463,13 +463,13 @@ SEXP rnng_recv(SEXP con, SEXP mode, SEXP block, SEXP bytes) {
463463
} else {
464464

465465
if ((xc = nng_aio_alloc(&aiop, NULL, NULL)))
466-
goto fail;
466+
goto exit;
467467
nng_aio_set_timeout(aiop, flags);
468468
nng_ctx_recv(*ctxp, aiop);
469469

470470
nng_aio_wait(aiop);
471471
if ((xc = nng_aio_result(aiop)))
472-
goto fail;
472+
goto exit;
473473

474474
msgp = nng_aio_get_msg(aiop);
475475
nng_aio_free(aiop);
@@ -493,14 +493,14 @@ SEXP rnng_recv(SEXP con, SEXP mode, SEXP block, SEXP bytes) {
493493

494494
if ((xc = nng_aio_alloc(&aiop, NULL, NULL)) ||
495495
(xc = nng_aio_set_iov(aiop, 1u, &iov)))
496-
goto fail2;
496+
goto exit2;
497497

498498
nng_aio_set_timeout(aiop, flags ? flags : (NANO_INTEGER(block) != 0) * NNG_DURATION_DEFAULT);
499499
nng_stream_recv(*sp, aiop);
500500

501501
nng_aio_wait(aiop);
502502
if ((xc = nng_aio_result(aiop)))
503-
goto fail2;
503+
goto exit2;
504504

505505
sz = nng_aio_count(aiop);
506506
nng_aio_free(aiop);
@@ -513,9 +513,9 @@ SEXP rnng_recv(SEXP con, SEXP mode, SEXP block, SEXP bytes) {
513513

514514
return res;
515515

516-
fail2:
516+
exit2:
517517
R_Free(buf);
518-
fail:
518+
exit:
519519
if (aiop) nng_aio_free(aiop);
520520
return mk_error(xc);
521521

0 commit comments

Comments
 (0)