bool ParentRecord::DefaultInit(char* val) Creates the record for a default parent proxy rule established by a config variable matcher_line* line_info - contains the value of proxy.config.http.parent_proxies Returns true on success and false on failure
| 603 | // Returns true on success and false on failure |
| 604 | // |
| 605 | bool |
| 606 | ParentRecord::DefaultInit(char *val) |
| 607 | { |
| 608 | const char *errPtr; |
| 609 | char *errBuf; |
| 610 | |
| 611 | this->go_direct = true; |
| 612 | this->ignore_query = false; |
| 613 | this->scheme = nullptr; |
| 614 | this->parent_is_proxy = true; |
| 615 | errPtr = ProcessParents(val, true); |
| 616 | |
| 617 | if (errPtr != nullptr) { |
| 618 | errBuf = static_cast<char *>(ats_malloc(1024)); |
| 619 | snprintf(errBuf, 1024, "%s %s for default parent proxy", modulePrefix, errPtr); |
| 620 | Error("%s", errBuf); |
| 621 | ats_free(errBuf); |
| 622 | return false; |
| 623 | } else { |
| 624 | ParentRR_t round_robin = P_NO_ROUND_ROBIN; |
| 625 | Dbg(dbg_ctl_parent_select, "allocating ParentRoundRobin() lookup strategy."); |
| 626 | selection_strategy = new ParentRoundRobin(this, round_robin); |
| 627 | return true; |
| 628 | } |
| 629 | } |
| 630 | |
| 631 | // Result ParentRecord::Init(matcher_line* line_info) |
| 632 | // |
no test coverage detected