Branch Coverage

Redis.xs
Criterion Covered Total %
branch 54 724 7.4


line true false branch
106 0 0 if (c == 'u' || c == 'U') return (0 == strcasecmp(cmd, "unsubscribe"));
0 0 if (c == 'u' || c == 'U') return (0 == strcasecmp(cmd, "unsubscribe"));
107 0 0 if (c == 'p' || c == 'P') return (0 == strcasecmp(cmd, "punsubscribe"));
0 0 if (c == 'p' || c == 'P') return (0 == strcasecmp(cmd, "punsubscribe"));
108 0 0 if (c == 's' || c == 'S') return (0 == strcasecmp(cmd, "sunsubscribe"));
0 0 if (c == 's' || c == 'S') return (0 == strcasecmp(cmd, "sunsubscribe"));
115 0 0 if (c == 's' || c == 'S') {
0 0 if (c == 's' || c == 'S') {
116 0 0 if (0 == strcasecmp(cmd, "subscribe")) return 1;
117 0 0 if (0 == strcasecmp(cmd, "ssubscribe")) return 1;
118 0 0 if (0 == strcasecmp(cmd, "sunsubscribe")) return 1;
121 0 0 if (c == 'u' || c == 'U') {
0 0 if (c == 'u' || c == 'U') {
124 0 0 if (c == 'p' || c == 'P') {
0 0 if (c == 'p' || c == 'P') {
125 0 0 if (0 == strcasecmp(cmd, "psubscribe")) return 1;
126 0 0 if (0 == strcasecmp(cmd, "punsubscribe")) return 1;
129 0 0 if (c == 'm' || c == 'M') {
0 0 if (c == 'm' || c == 'M') {
142 0 0 if (reply->type != REDIS_REPLY_ARRAY && reply->type != REDIS_REPLY_PUSH) return 0;
0 0 if (reply->type != REDIS_REPLY_ARRAY && reply->type != REDIS_REPLY_PUSH) return 0;
143 0 0 if (reply->elements < 3) return 0;
144 0 0 if (NULL == reply->element[0]) return 0;
145 0 0 if (reply->element[0]->type != REDIS_REPLY_STRING &&
146 0 0 reply->element[0]->type != REDIS_REPLY_STATUS) return 0;
149 0 0 if (s[0] == 'u' || s[0] == 'U') return (0 == strcasecmp(s, "unsubscribe"));
0 0 if (s[0] == 'u' || s[0] == 'U') return (0 == strcasecmp(s, "unsubscribe"));
150 0 0 if (s[0] == 'p' || s[0] == 'P') return (0 == strcasecmp(s, "punsubscribe"));
0 0 if (s[0] == 'p' || s[0] == 'P') return (0 == strcasecmp(s, "punsubscribe"));
151 0 0 if (s[0] == 's' || s[0] == 'S') return (0 == strcasecmp(s, "sunsubscribe"));
0 0 if (s[0] == 's' || s[0] == 'S') return (0 == strcasecmp(s, "sunsubscribe"));
156 0 0 if (NULL == self->error_handler) return;
163 0 0 PUSHMARK(SP);
164 0 0 XPUSHs(error);
168 0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
169 0 0 warn("EV::Redis: exception in error handler: %s", SvPV_nolen(ERRSV));
172 0 0 FREETMPS;
177 0 0 if (NULL == self->error_handler) return;
185 0 0 PUSHMARK(SP);
186 0 0 EXTEND(SP, 2);
191 0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
192 0 0 warn("EV::Redis: exception in command callback: %s", SvPV_nolen(ERRSV));
194 0 0 FREETMPS;
202 0 0 if (self->magic == EV_REDIS_FREED &&
203 0 0 self->callback_depth == 0 &&
204 0 0 self->current_cb == NULL) {
213 0 6 if (NULL != self->host) { Safefree(self->host); self->host = NULL; }
214 0 6 if (NULL != self->path) { Safefree(self->path); self->path = NULL; }
215 0 6 if (NULL != self->source_addr) { Safefree(self->source_addr); self->source_addr = NULL; }
216 0 6 if (NULL != self->connect_timeout) { Safefree(self->connect_timeout); self->connect_timeout = NULL; }
217 0 6 if (NULL != self->command_timeout) { Safefree(self->command_timeout); self->command_timeout = NULL; }
219 2 4 if (NULL != self->ssl_ctx) { redisFreeSSLContext(self->ssl_ctx); self->ssl_ctx = NULL; }
224 0 6 if (self->waiting_timer_active && NULL != self->loop && !PL_dirty) {
0 0 if (self->waiting_timer_active && NULL != self->loop && !PL_dirty) {
0 0 if (self->waiting_timer_active && NULL != self->loop && !PL_dirty) {
231 0 6 if (self->reconnect_timer_active && NULL != self->loop && !PL_dirty) {
0 0 if (self->reconnect_timer_active && NULL != self->loop && !PL_dirty) {
0 0 if (self->reconnect_timer_active && NULL != self->loop && !PL_dirty) {
241 0 0 if (ms < 0) croak("%s must be non-negative", name);
242 0 0 if (ms > MAX_TIMEOUT_MS) croak("%s too large (max %d ms)", name, MAX_TIMEOUT_MS);
246 0 0 if (NULL != timeout_ms && SvOK(timeout_ms)) {
0 0 if (NULL != timeout_ms && SvOK(timeout_ms)) {
249 0 0 if (NULL == *tv_ptr) {
256 0 0 if (NULL != *tv_ptr) {
268 0 6 if (NULL != *handler_ptr) {
274 6 0 if (has_handler_arg && NULL != handler && SvOK(handler) && SvROK(handler) &&
6 0 if (has_handler_arg && NULL != handler && SvOK(handler) && SvROK(handler) &&
6 0 if (has_handler_arg && NULL != handler && SvOK(handler) && SvROK(handler) &&
6 0 if (has_handler_arg && NULL != handler && SvOK(handler) && SvROK(handler) &&
275 6 0 SvTYPE(SvRV(handler)) == SVt_PVCV) {
281 6 0 : &PL_sv_undef;
290 0 6 if (self->in_cb_cleanup) {
299 0 6 while (!ngx_queue_empty(&self->cb_queue)) {
303 0 0 if (cbt == self->current_cb) {
305 0 0 if (ngx_queue_next(q) == ngx_queue_sentinel(&self->cb_queue)) {
313 0 0 if (!cbt->persist) self->pending_count--;
315 0 0 if (NULL != cbt->cb) {
316 0 0 if (NULL != error_sv) {
329 0 0 for (i = 0; i < wt->argc; i++) {
334 0 0 if (NULL != wt->cb) {
345 0 6 if (self->in_wait_cleanup) {
353 0 6 while (!ngx_queue_empty(&self->wait_queue)) {
359 0 0 if (NULL != error_sv && NULL != wt->cb) {
0 0 if (NULL != error_sv && NULL != wt->cb) {
383 0 0 if (NULL != self->host) {
387 0 0 if (NULL != self->path) {
399 0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
405 0 0 if (check_destroyed(self)) return;
411 0 0 if (!self->reconnect) return;
412 0 0 if (self->intentional_disconnect) return;
413 0 0 if (NULL == self->loop) return;
415 0 0 if (self->max_reconnect_attempts > 0 &&
416 0 0 self->reconnect_attempts >= self->max_reconnect_attempts) {
450 0 0 while (!ngx_queue_empty(&self->wait_queue)) {
454 0 0 if (now - wt->queued_at >= timeout) {
458 0 0 if (NULL != wt->cb) {
478 0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
485 0 0 if (check_destroyed(self)) return;
496 0 0 if (NULL == self->loop) return;
497 0 0 if (self->waiting_timeout_ms <= 0) return;
498 0 0 if (ngx_queue_empty(&self->wait_queue)) return;
506 0 0 if (delay < 0) delay = 0;
518 0 0 if (NULL == self->loop) {
523 0 0 if (NULL != self->ac) {
531 0 0 if (NULL != self->path) {
534 0 0 else if (NULL != self->host) {
543 0 0 if (NULL == self->ac) {
549 0 0 if (REDIS_OK != post_connect_setup(self, "reconnect error")) {
558 0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
562 0 0 if (REDIS_OK != status) {
564 0 0 emit_error_str(self, c->errstr[0] ? c->errstr : "connect failed");
565 0 0 if (!self->reconnect || !self->resume_waiting_on_reconnect
0 0 if (!self->reconnect || !self->resume_waiting_on_reconnect
566 0 0 || self->intentional_disconnect) {
567 0 0 clear_wait_queue_sv(self, sv_2mortal(newSVpv(
576 0 0 if (NULL != self->connect_handler) {
582 0 0 PUSHMARK(SP);
586 0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
587 0 0 warn("EV::Redis: exception in connect handler: %s", SvPV_nolen(ERRSV));
590 0 0 FREETMPS;
608 0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
615 0 0 if (self->ac != NULL && self->ac != c) {
0 0 if (self->ac != NULL && self->ac != c) {
616 0 0 if (self->ac_saved == c) self->ac_saved = NULL;
627 0 0 if (REDIS_OK == status) {
631 0 0 error_sv = sv_2mortal(newSVpv(
633 0 0 emit_error_str(self, c->errstr[0] ? c->errstr : "disconnected");
634 0 0 if (!was_intentional) {
639 0 0 if (NULL != self->disconnect_handler) {
645 0 0 PUSHMARK(SP);
649 0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
650 0 0 warn("EV::Redis: exception in disconnect handler: %s", SvPV_nolen(ERRSV));
653 0 0 FREETMPS;
659 0 0 if (self->ac != NULL && self->ac != c) {
0 0 if (self->ac != NULL && self->ac != c) {
670 0 0 will_reconnect = should_reconnect && !self->intentional_disconnect && self->reconnect;
0 0 will_reconnect = should_reconnect && !self->intentional_disconnect && self->reconnect;
0 0 will_reconnect = should_reconnect && !self->intentional_disconnect && self->reconnect;
671 0 0 if (!self->resume_waiting_on_reconnect || was_intentional || !will_reconnect) {
0 0 if (!self->resume_waiting_on_reconnect || was_intentional || !will_reconnect) {
0 0 if (!self->resume_waiting_on_reconnect || was_intentional || !will_reconnect) {
676 0 0 if (will_reconnect) {
688 0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
0 0 if (NULL == self || self->magic != EV_REDIS_MAGIC) return;
689 0 0 if (NULL == self->push_handler || NULL == reply) return;
0 0 if (NULL == self->push_handler || NULL == reply) return;
699 0 0 PUSHMARK(SP);
700 0 0 XPUSHs(sv_2mortal(EV__redis_decode_reply(reply)));
704 0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
705 0 0 warn("EV::Redis: exception in push handler: %s", SvPV_nolen(ERRSV));
708 0 0 FREETMPS;
717 0 0 if (NULL != self->connect_timeout) {
720 0 0 if (NULL != self->command_timeout) {
723 0 0 if (self->prefer_ipv4) {
726 0 0 else if (self->prefer_ipv6) {
729 0 0 if (self->cloexec) {
732 0 0 if (self->reuseaddr) {
735 0 0 if (NULL != self->source_addr && NULL == self->path) {
0 0 if (NULL != self->source_addr && NULL == self->path) {
747 0 0 if (NULL != self->ssl_ctx) {
748 0 0 if (REDIS_OK != redisInitiateSSLWithContext(&self->ac->c, self->ssl_ctx)) {
749 0 0 SV* err = sv_2mortal(newSVpvf("%s: SSL initiation failed: %s",
759 0 0 if (self->keepalive > 0) {
762 0 0 if (self->tcp_user_timeout > 0) {
766 0 0 if (REDIS_OK != redisLibevAttach(self->loop, self->ac)) {
774 0 0 if (self->priority != 0) {
780 0 0 if (NULL != self->push_handler) {
784 0 0 if (self->ac->err) {
830 0 0 if (reply->elements > 0) {
832 0 0 for (i = 0; i < reply->elements; i++) {
833 0 0 if (NULL != reply->element[i]) {
862 0 0 if (cbt->skipped) {
863 0 0 if (!cbt->persist || NULL == reply) {
0 0 if (!cbt->persist || NULL == reply) {
866 0 0 if (cbt->persist && NULL == reply && cbt->sub_count > 1) {
0 0 if (cbt->persist && NULL == reply && cbt->sub_count > 1) {
0 0 if (cbt->persist && NULL == reply && cbt->sub_count > 1) {
872 0 0 else if (cbt->persist && reply != NULL && is_unsub_reply((redisReply*)reply)) {
0 0 else if (cbt->persist && reply != NULL && is_unsub_reply((redisReply*)reply)) {
0 0 else if (cbt->persist && reply != NULL && is_unsub_reply((redisReply*)reply)) {
874 0 0 if (cbt->sub_count <= 0) {
889 0 0 if (self == NULL) {
890 0 0 if (NULL != cbt->cb) {
892 0 0 sv_2mortal(newSVpv(c->errstr[0] ? c->errstr : "disconnected", 0)));
896 0 0 if (cbt->persist && reply == NULL && cbt->sub_count > 1) {
0 0 if (cbt->persist && reply == NULL && cbt->sub_count > 1) {
0 0 if (cbt->persist && reply == NULL && cbt->sub_count > 1) {
908 0 0 if (self->magic == EV_REDIS_FREED) {
909 0 0 if (NULL != cbt->cb) {
911 0 0 invoke_callback_error(cbt->cb, sv_2mortal(newSVpv(c->errstr[0] ? c->errstr : "disconnected", 0)));
916 0 0 if (!cbt->persist) {
927 0 0 if (self->magic != EV_REDIS_MAGIC) {
928 0 0 if (NULL != cbt->cb) SvREFCNT_dec(cbt->cb);
936 0 0 if (NULL != cbt->cb) {
937 0 0 if (NULL == reply) {
938 0 0 sv_err = sv_2mortal(newSVpv(
948 0 0 PUSHMARK(SP);
949 0 0 EXTEND(SP, 2);
951 0 0 if (((redisReply*)reply)->type == REDIS_REPLY_ERROR) {
961 0 0 if (SvTRUE(ERRSV)) {
0 0 if (SvTRUE(ERRSV)) {
962 0 0 warn("EV::Redis: exception in command callback: %s", SvPV_nolen(ERRSV));
965 0 0 FREETMPS;
980 0 0 if (self->magic == EV_REDIS_FREED) {
981 0 0 if (NULL != cbt->cb) {
985 0 0 if (!cbt->persist) {
992 0 0 if (cbt->skipped) {
1003 0 0 if (cbt->persist && cbt->sub_count > 1) {
0 0 if (cbt->persist && cbt->sub_count > 1) {
1018 0 0 if (cbt->persist && reply != NULL && is_unsub_reply((redisReply*)reply)) {
0 0 if (cbt->persist && reply != NULL && is_unsub_reply((redisReply*)reply)) {
0 0 if (cbt->persist && reply != NULL && is_unsub_reply((redisReply*)reply)) {
1020 0 0 if (cbt->sub_count <= 0) {
1025 0 0 if (NULL != cbt->cb) SvREFCNT_dec(cbt->cb);
1037 0 0 if (cbt->persist && NULL == reply) {
0 0 if (cbt->persist && NULL == reply) {
1038 0 0 if (cbt->sub_count > 1) {
1043 0 0 if (NULL != cbt->cb) SvREFCNT_dec(cbt->cb);
1051 0 0 if (0 == cbt->persist) {
1060 0 0 if (NULL != cbt->cb) SvREFCNT_dec(cbt->cb);
1064 0 0 if (reply != NULL) {
1084 0 0 if (cbt->persist && is_unsubscribe_command(cmd)) {
0 0 if (cbt->persist && is_unsubscribe_command(cmd)) {
1094 0 0 if (REDIS_OK != r) {
1096 0 0 if (!cbt->persist) self->pending_count--;
1098 0 0 if (NULL != cbt->cb) {
1099 0 0 invoke_callback_error(cbt->cb, sv_2mortal(newSVpv(
0 0 invoke_callback_error(cbt->cb, sv_2mortal(newSVpv(
1104 0 0 } else if (fn == NULL) {
1108 0 0 if (NULL != cbt->cb) SvREFCNT_dec(cbt->cb);
1124 0 0 if (NULL == self->ac || self->intentional_disconnect) return;
0 0 if (NULL == self->ac || self->intentional_disconnect) return;
1125 0 0 if (ngx_queue_empty(&self->wait_queue)) return;
1126 0 0 if (self->max_pending > 0 && self->pending_count >= self->max_pending) return;
0 0 if (self->max_pending > 0 && self->pending_count >= self->max_pending) return;
1138 0 0 cbt->sub_count = wt->persist ? wt->argc - 1 : 0;
1141 0 0 if (!cbt->persist) self->pending_count++;
1155 0 24 I_EV_API("EV::Redis");
24 0 I_EV_API("EV::Redis");
0 24 I_EV_API("EV::Redis");
1195 0 6 if (self->magic != EV_REDIS_MAGIC) {
1196 0 0 if (self->magic == EV_REDIS_FREED) {
1221 0 6 if (PL_dirty) {
1222 0 0 if (NULL != self->ac) {
1229 0 0 q != ngx_queue_sentinel(&self->cb_queue);
1239 0 0 if (NULL != self->ac_saved) {
1245 0 0 while (!ngx_queue_empty(&self->wait_queue)) {
1266 0 6 if (NULL != ac_to_free) {
1271 0 0 if (ac_to_free->c.flags & REDIS_IN_CALLBACK) {
1284 0 6 if (self->ac_saved != NULL) {
1289 6 0 CLEAR_HANDLER(self->error_handler);
1290 0 6 CLEAR_HANDLER(self->connect_handler);
1291 0 6 CLEAR_HANDLER(self->disconnect_handler);
1292 0 6 CLEAR_HANDLER(self->push_handler);
1295 6 0 if (!self->in_wait_cleanup) {
1298 6 0 if (!skip_cb_cleanup && !self->in_cb_cleanup) {
6 0 if (!skip_cb_cleanup && !self->in_cb_cleanup) {
1306 6 0 if (self->current_cb == NULL && self->callback_depth == 0) {
6 0 if (self->current_cb == NULL && self->callback_depth == 0) {
1317 0 0 if (NULL != self->ac) {
1331 0 0 if (NULL == self->ac) {
1344 0 0 if (NULL != self->ac) {
1357 0 0 if (NULL == self->ac) {
1373 0 0 if (NULL == self->ac) {
1378 0 0 if (!ngx_queue_empty(&self->wait_queue)) {
1395 0 0 if (self->ac->c.flags & REDIS_IN_CALLBACK) {
1404 0 0 if (check_destroyed(self)) return;
1411 0 0 RETVAL = (NULL != self->ac) ? 1 : 0;
1431 0 0 if (NULL != timeout_ms && SvOK(timeout_ms) && NULL != self->ac && NULL != self->command_timeout) {
0 0 if (NULL != timeout_ms && SvOK(timeout_ms) && NULL != self->ac && NULL != self->command_timeout) {
0 0 if (NULL != timeout_ms && SvOK(timeout_ms) && NULL != self->ac && NULL != self->command_timeout) {
0 0 if (NULL != timeout_ms && SvOK(timeout_ms) && NULL != self->ac && NULL != self->command_timeout) {
1471 0 0 if (NULL != self->ac) {
1472 0 0 if (NULL != self->push_handler) {
1495 0 1 if (items < 2) {
1500 1 0 if (SvROK(cb) && SvTYPE(SvRV(cb)) == SVt_PVCV) {
1 0 if (SvROK(cb) && SvTYPE(SvRV(cb)) == SVt_PVCV) {
1508 0 1 if (argc < 1) {
1512 1 0 if (NULL == self->ac) {
1513 1 0 if (!self->reconnect_timer_active) {
1523 0 0 for (i = 0; i < argc; i++) {
1530 0 0 if (NULL == self->ac ||
1531 0 0 (self->max_pending > 0 && self->pending_count >= self->max_pending)) {
0 0 (self->max_pending > 0 && self->pending_count >= self->max_pending)) {
1535 0 0 for (i = 0; i < argc; i++) {
1557 0 0 cbt->sub_count = persist ? argc - 1 : 0;
1560 0 0 if (!persist) self->pending_count++;
1579 0 0 if (!enable) {
1588 0 0 RETVAL = self->reconnect;
1597 0 0 RETVAL = self->pending_count;
1606 0 0 RETVAL = self->waiting_count;
1615 0 0 if (NULL != limit && SvOK(limit)) {
0 0 if (NULL != limit && SvOK(limit)) {
1617 0 0 if (val < 0) {
1628 0 0 if (check_destroyed(self)) XSRETURN_IV(0);
1630 0 0 RETVAL = self->max_pending;
1639 0 0 if (NULL != timeout_ms && SvOK(timeout_ms)) {
0 0 if (NULL != timeout_ms && SvOK(timeout_ms)) {
1655 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1658 0 0 RETVAL = self->resume_waiting_on_reconnect;
1667 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1669 0 0 if (prio < EV_MINPRI) prio = EV_MINPRI;
1670 0 0 if (prio > EV_MAXPRI) prio = EV_MAXPRI;
1672 0 0 if (NULL != self->ac) {
1676 0 0 RETVAL = self->priority;
1685 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1687 0 0 if (interval < 0) croak("keepalive interval must be non-negative");
1688 0 0 if (interval > MAX_TIMEOUT_MS / 1000) croak("keepalive interval too large");
1690 0 0 if (NULL != self->ac && interval > 0) {
0 0 if (NULL != self->ac && interval > 0) {
1694 0 0 RETVAL = self->keepalive;
1703 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1705 0 0 if (self->prefer_ipv4) self->prefer_ipv6 = 0;
1707 0 0 RETVAL = self->prefer_ipv4;
1716 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1718 0 0 if (self->prefer_ipv6) self->prefer_ipv4 = 0;
1720 0 0 RETVAL = self->prefer_ipv6;
1729 0 0 if (items > 1) {
1730 0 0 if (NULL != self->source_addr) {
1734 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1738 0 0 if (NULL != self->source_addr) {
1751 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1756 0 0 RETVAL = self->tcp_user_timeout;
1765 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1768 0 0 RETVAL = self->cloexec;
1777 0 0 if (NULL != value && SvOK(value)) {
0 0 if (NULL != value && SvOK(value)) {
1780 0 0 RETVAL = self->reuseaddr;
1794 0 0 if (self->in_wait_cleanup) {
1823 0 0 if (self->in_cb_cleanup) {
1834 0 0 while (!ngx_queue_empty(&self->cb_queue)) {
1838 0 0 if (cbt == self->current_cb) {
1840 0 0 if (ngx_queue_next(q) == ngx_queue_sentinel(&self->cb_queue)) {
1851 0 0 while (!ngx_queue_empty(&local_queue)) {
1852 0 0 if (self->magic == EV_REDIS_FREED) {
1867 0 0 if (!cbt->persist) self->pending_count--;
1872 0 0 if (NULL != cbt->cb) {
1893 0 4 RETVAL = 1;
1911 1 3 ssl_opts.cacert_filename = (SvOK(cacert)) ? SvPV_nolen(cacert) : NULL;
1912 1 3 ssl_opts.capath = (SvOK(capath)) ? SvPV_nolen(capath) : NULL;
1913 1 3 ssl_opts.cert_filename = (SvOK(cert)) ? SvPV_nolen(cert) : NULL;
1914 0 4 ssl_opts.private_key_filename = (SvOK(key)) ? SvPV_nolen(key) : NULL;
1915 0 4 ssl_opts.server_name = (SvOK(server_name)) ? SvPV_nolen(server_name) : NULL;
1918 0 4 if (NULL != self->ssl_ctx) {
1925 2 2 if (NULL == self->ssl_ctx) {