ParentRecord* createDefaultParent(char* val) Atttemtps to allocate and init new ParentRecord for a default parent Returns a pointer to the new record on success and NULL on failure
| 891 | // and NULL on failure |
| 892 | // |
| 893 | ParentRecord * |
| 894 | createDefaultParent(char *val) |
| 895 | { |
| 896 | ParentRecord *newRec; |
| 897 | |
| 898 | if (val == nullptr || *val == '\0') { |
| 899 | return nullptr; |
| 900 | } |
| 901 | |
| 902 | newRec = new ParentRecord; |
| 903 | if (newRec->DefaultInit(val) == true) { |
| 904 | return newRec; |
| 905 | } else { |
| 906 | delete newRec; |
| 907 | return nullptr; |
| 908 | } |
| 909 | } |
| 910 | |
| 911 | // |
| 912 | // ParentConfig equivalent functions for SocksServerConfig |
no test coverage detected