| 1 |
|
| #include "scan.h" |
| 2 |
|
| #include "enum2sv.h" |
| 3 |
|
| |
| 4 |
2 |
| void scan_result_response(const char** src, const char* max, HV *out) { |
| 5 |
|
| I32 r; |
| 6 |
|
| SV *sv; |
| 7 |
|
| |
| 8 |
2 |
| scan_enum(src, max, &r); |
| 9 |
2 |
| hv_stores(out, "result", newSVsv(ldap_error2sv_noinc(r))); |
| 10 |
|
| |
| 11 |
2 |
| sv = newSV(0); |
| 12 |
2 |
| hv_stores(out, "matched_dn", sv); |
| 13 |
2 |
| scan_string_utf8(src, max, sv); |
| 14 |
|
| |
| 15 |
2 |
| sv = newSV(0); |
| 16 |
2 |
| hv_stores(out, "message", sv); |
| 17 |
2 |
| scan_string_utf8(src, max, sv); |
| 18 |
|
| |
| 19 |
2 |
▶ | if (*src < max) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (*src < max) { |
0 |
2 |
2 |
|
| 20 |
|
| U8 type; |
| 21 |
|
| U32 tag; |
| 22 |
|
| STRLEN len; |
| 23 |
|
| AV *referrals; |
| 24 |
0 |
| scan_tag(src, max, &type, &tag); |
| 25 |
0 |
▶ | if (type != (ASN1_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED) || tag != 3) |
Branch: 2 branches
| Branch | True | False | Total |
| if (type != (ASN1_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED) || tag != 3) |
0 |
0 |
0 |
| if (type != (ASN1_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED) || tag != 3) |
0 |
0 |
0 |
|
| 26 |
0 |
| croak("bad packed data"); |
| 27 |
0 |
| scan_length(src, max, &len); |
| 28 |
0 |
▶ | if (len != max - *src) |
Branch: 1 branch
| Branch | True | False | Total |
| if (len != max - *src) |
0 |
0 |
0 |
|
| 29 |
0 |
| croak("scan_result_response: packet too short"); |
| 30 |
|
| |
| 31 |
0 |
| referrals = newAV(); |
| 32 |
0 |
| hv_stores(out, "referrals", newRV_noinc((SV*)referrals)); |
| 33 |
|
| |
| 34 |
0 |
▶ | while (*src < max) { |
Branch: 1 branch
| Branch | True | False | Total |
| while (*src < max) { |
0 |
0 |
0 |
|
| 35 |
0 |
| SV *v = newSV(0); |
| 36 |
0 |
| av_push(referrals, v); |
| 37 |
0 |
| scan_string_utf8(src, max, v); |
| 38 |
|
| } |
| 39 |
|
| } |
| 40 |
2 |
| } |
| 41 |
|
| |