line |
true |
false |
branch |
68
|
17 |
0 |
if (ssv) { |
69
|
17 |
0 |
return SvIV(*ssv); |
78
|
1 |
7 |
if (ret < 0) _smaller_zero_err(key); |
|
1 |
4 |
if (ret < 0) _smaller_zero_err(key); |
|
1 |
3 |
if (ret < 0) _smaller_zero_err(key); |
87
|
16 |
0 |
if (ssv) { |
88
|
2 |
14 |
return SvNV(*ssv); |
97
|
1 |
6 |
if (ret < 0) _smaller_zero_err(key); |
|
1 |
5 |
if (ret < 0) _smaller_zero_err(key); |
|
1 |
2 |
if (ret < 0) _smaller_zero_err(key); |
111
|
0 |
8 |
if ( utf8 ) { |
112
|
0 |
0 |
SvGETMAGIC(string); |
113
|
0 |
0 |
if (!SvUTF8(string)) { |
118
|
8 |
0 |
return (char *)SvPV(string, *len); |
126
|
0 |
0 |
if ( req > *cur ) { |
|
0 |
0 |
if ( req > *cur ) { |
|
0 |
0 |
if ( req > *cur ) { |
|
0 |
8 |
if ( req > *cur ) { |
|
0 |
8 |
if ( req > *cur ) { |
|
0 |
8 |
if ( req > *cur ) { |
|
0 |
0 |
if ( req > *cur ) { |
|
0 |
0 |
if ( req > *cur ) { |
|
0 |
0 |
if ( req > *cur ) { |
|
0 |
1 |
if ( req > *cur ) { |
139
|
0 |
0 |
} while ( snum /= 10); |
|
0 |
0 |
} while ( snum /= 10); |
|
0 |
8 |
} while ( snum /= 10); |
|
0 |
0 |
} while ( snum /= 10); |
|
0 |
0 |
} while ( snum /= 10); |
149
|
24 |
0 |
if (!p) { |
152
|
0 |
24 |
if ( *(p-1) == '\r' ) { |
155
|
0 |
0 |
while( offset < buf_len -1 ) { |
156
|
0 |
0 |
if (buf[offset] == 13 && buf[offset+1] == 10 ) { |
|
0 |
0 |
if (buf[offset] == 13 && buf[offset+1] == 10 ) { |
171
|
3 |
8 |
if ( utf8 ) { SvUTF8_on(dst); } |
179
|
7 |
0 |
d = SvGROW(data_sv, copy_len); |
|
7 |
0 |
d = SvGROW(data_sv, copy_len); |
183
|
0 |
7 |
if ( utf8 ) { |
206
|
13 |
0 |
if ( buf_len < 2 ) { |
210
|
13 |
0 |
if ( first_crlf < 0 ) { |
233
|
0 |
1 |
if ( buf[1] == '-' && buf[2] == '1' ) { |
|
0 |
0 |
if ( buf[1] == '-' && buf[2] == '1' ) { |
239
|
1 |
1 |
for (j=1; j
|
242
|
1 |
0 |
if ( buf_len - (first_crlf + 2) < v_size + 2 ) { |
261
|
0 |
5 |
if ( buf[1] == '-' && buf[2] == '1' ) { |
|
0 |
0 |
if ( buf[1] == '-' && buf[2] == '1' ) { |
267
|
5 |
5 |
for (j=1; j
|
271
|
0 |
5 |
if ( m_size == 0 ) { |
279
|
11 |
0 |
while ( m_buf_len > m_read ) { |
280
|
11 |
0 |
if (m_buf[0] != '$' ) { |
283
|
0 |
11 |
if (m_buf[1] == '-' && m_buf[2] == '1' ) { |
|
0 |
0 |
if (m_buf[1] == '-' && m_buf[2] == '1' ) { |
290
|
11 |
0 |
if ( m_first_crlf < 0 ) { |
294
|
11 |
11 |
for (j=1; j
|
297
|
11 |
0 |
if ( m_buf_len - m_read - (m_first_crlf + 2) < m_v_size + 2 ) { |
303
|
6 |
5 |
if ( av_len(av_list) + 1 == m_size ) { |
307
|
5 |
0 |
if ( av_len(av_list) + 1 < m_size ) { |
326
|
2 |
0 |
if ( rv >= 0 ) { |
329
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
337
|
0 |
0 |
if ( nfound == 1 ) { |
340
|
0 |
0 |
if ( nfound == 0 && errno != EINTR ) { |
|
0 |
0 |
if ( nfound == 0 && errno != EINTR ) { |
357
|
3 |
0 |
if ( rv >= 0 ) { |
360
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
|
0 |
0 |
if ( rv < 0 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK ) { |
368
|
3 |
0 |
if ( nfound == 1 ) { |
371
|
0 |
0 |
if ( nfound == 0 && errno != EINTR ) { |
|
0 |
0 |
if ( nfound == 0 && errno != EINTR ) { |
382
|
2 |
2 |
if ( hv_exists(self->bucket, "socket", strlen("socket")) ) { |
402
|
8 |
0 |
if ( SvTYPE(SvRV(args)) == SVt_PVHV) { |
404
|
8 |
0 |
if ( server_ssv ) { |
441
|
0 |
4 |
XPUSHs(self->server); |
489
|
2 |
0 |
if ( self->request_buf_len != 0 ) { |
492
|
2 |
0 |
if ( self->response_st_len != 0 ) { |
495
|
2 |
0 |
if ( self->read_buf_len != 0 ) { |
520
|
7 |
0 |
buf = SvPV_nolen(buf_sv); |
522
|
8 |
7 |
while ( buf_len > 0 ) { |
524
|
8 |
0 |
(void)SvUPGRADE(data_sv, SVt_PV); |
526
|
8 |
0 |
(void)SvUPGRADE(error_sv, SVt_PV); |
528
|
0 |
8 |
if ( ret == -1 ) { |
531
|
8 |
0 |
else if ( ret == -2 ) { |
537
|
7 |
1 |
if ( SvOK(error_sv) ) { |
|
7 |
0 |
if ( SvOK(error_sv) ) { |
|
0 |
7 |
if ( SvOK(error_sv) ) { |
583
|
2 |
0 |
if ( self->request_buf_len == 0 ) { |
587
|
2 |
0 |
if ( self->read_buf_len == 0 ) { |
591
|
2 |
0 |
if ( self->response_st_len == 0 ) { |
597
|
2 |
0 |
if ( self->fileno == 0 ) { |
602
|
0 |
2 |
PUSHMARK(SP); |
603
|
0 |
2 |
XPUSHs(ST(0)); |
606
|
2 |
0 |
FREETMPS; |
609
|
0 |
2 |
if ( self->fileno == 0 ) { |
612
|
0 |
0 |
if ( self->reconnect_attempts > connect_retry ) { |
617
|
0 |
0 |
if ( PIPELINE(ix) ) { |
619
|
0 |
0 |
EXTEND(SP, pipeline_len); |
|
0 |
0 |
EXTEND(SP, pipeline_len); |
620
|
0 |
0 |
for (i=0; i
|
623
|
0 |
0 |
(void)av_push(data_av, newSVpvf("failed to connect server: %s", |
629
|
0 |
0 |
EXTEND(SP, 2); |
631
|
0 |
0 |
PUSHs(sv_2mortal(newSVpvf("failed to connect server: %s", |
646
|
2 |
0 |
if ( PIPELINE(ix) ) { |
649
|
8 |
2 |
for( i=args_offset; i < items; i++ ) { |
650
|
0 |
8 |
if ( SvOK(ST(i)) && SvROK(ST(i)) && SvTYPE(SvRV(ST(i))) == SVt_PVAV ) { |
|
0 |
0 |
if ( SvOK(ST(i)) && SvROK(ST(i)) && SvTYPE(SvRV(ST(i))) == SVt_PVAV ) { |
|
0 |
0 |
if ( SvOK(ST(i)) && SvROK(ST(i)) && SvTYPE(SvRV(ST(i))) == SVt_PVAV ) { |
|
0 |
8 |
if ( SvOK(ST(i)) && SvROK(ST(i)) && SvTYPE(SvRV(ST(i))) == SVt_PVAV ) { |
|
0 |
0 |
if ( SvOK(ST(i)) && SvROK(ST(i)) && SvTYPE(SvRV(ST(i))) == SVt_PVAV ) { |
652
|
0 |
0 |
fig = FIGURES(av_len(request_arg_list)+1); |
659
|
0 |
0 |
for (j=0; j
|
661
|
0 |
0 |
fig = FIGURES(request_arg_len); |
683
|
8 |
0 |
fig = FIGURES(request_arg_len); |
700
|
0 |
0 |
fig = FIGURES(items-args_offset); |
707
|
0 |
0 |
for (j=args_offset; j
|
709
|
0 |
0 |
fig = FIGURES(request_arg_len); |
729
|
2 |
2 |
while ( request_len > written ) { |
731
|
2 |
0 |
if ( ret <= 0 ) { |
739
|
2 |
0 |
if ( PIPELINE(ix) ) { |
740
|
2 |
0 |
EXTEND(SP, pipeline_len); |
|
0 |
2 |
EXTEND(SP, pipeline_len); |
741
|
0 |
2 |
if ( pipeline_len > self->response_st_len ) { |
742
|
0 |
0 |
Renew(self->response_st, sizeof(struct jet_response_st)*pipeline_len, struct jet_response_st); |
747
|
0 |
0 |
EXTEND(SP, 2); |
751
|
0 |
2 |
if (ret <= 0) { |
753
|
0 |
0 |
if ( ret == 0 && self->reconnect_attempts > connect_retry ) { |
|
0 |
0 |
if ( ret == 0 && self->reconnect_attempts > connect_retry ) { |
758
|
0 |
0 |
if ( PIPELINE(ix) ) { |
759
|
0 |
0 |
for (i=0; i
|
762
|
0 |
0 |
(void)av_push(data_av, newSVpvf("failed to send message: %s", |
769
|
0 |
0 |
PUSHs(sv_2mortal(newSVpvf("failed to send message: %s", |
776
|
2 |
0 |
if ( self->noreply > 0 ) { |
778
|
0 |
0 |
if ( PIPELINE(ix) ) { |
779
|
0 |
0 |
for (i=0; i
|
797
|
1 |
2 |
if ( ret <= 0 ) { |
800
|
1 |
0 |
if ( PIPELINE(ix) ) { |
801
|
2 |
1 |
for (i=parsed_response; i
|
804
|
0 |
2 |
(void)av_push(data_av, newSVpvf("failed to read message: %s", ( errno != 0 ) ? strerror(errno) : "timeout or disconnected")); |
810
|
0 |
0 |
self->response_st[1].data = newSVpvf("failed to read message: %s", ( errno != 0 ) ? strerror(errno) : "timeout or disconnected"); |
815
|
5 |
1 |
while ( readed > parse_offset ) { |
817
|
5 |
0 |
(void)SvUPGRADE(data_sv, SVt_PV); |
819
|
5 |
0 |
(void)SvUPGRADE(error_sv, SVt_PV); |
822
|
1 |
4 |
if ( parse_result == -1 ) { |
825
|
1 |
0 |
if ( PIPELINE(ix) ) { |
826
|
2 |
1 |
for (i=parsed_response; i
|
839
|
4 |
0 |
else if ( parse_result == -2 ) { |
844
|
4 |
0 |
if ( PIPELINE(ix) ) { |
847
|
4 |
0 |
if ( SvOK(error_sv) ) { |
|
4 |
0 |
if ( SvOK(error_sv) ) { |
|
0 |
4 |
if ( SvOK(error_sv) ) { |
854
|
4 |
0 |
if ( parsed_response >= pipeline_len ) { |
869
|
2 |
0 |
if ( PIPELINE(ix) ) { |
870
|
8 |
2 |
for (i=0; i
|
876
|
0 |
0 |
if ( SvOK(self->response_st[1].data) ) { |
|
0 |
0 |
if ( SvOK(self->response_st[1].data) ) { |
|
0 |
0 |
if ( SvOK(self->response_st[1].data) ) { |
885
|
0 |
2 |
if ( self->request_buf_len > REQUEST_BUF_SIZE * 4 ) { |
889
|
0 |
2 |
if ( self->response_st_len > 100 ) { |
893
|
0 |
2 |
if ( self->read_buf_len > READ_MAX * 4 ) { |