-------------------------------------------------------------- SplitDNSRecord::ProcessDefDomain() -------------------------------------------------------------- */
| 370 | SplitDNSRecord::ProcessDefDomain() |
| 371 | -------------------------------------------------------------- */ |
| 372 | const char * |
| 373 | SplitDNSRecord::ProcessDefDomain(char *val) |
| 374 | { |
| 375 | Tokenizer pTok(",; \t\r"); |
| 376 | int numTok; |
| 377 | |
| 378 | numTok = pTok.Initialize(val, SHARE_TOKS); |
| 379 | |
| 380 | if (numTok > 1) { |
| 381 | return "more than one default domain name specified"; |
| 382 | } |
| 383 | |
| 384 | if (numTok == 0) { |
| 385 | return "no default domain name specified"; |
| 386 | } |
| 387 | |
| 388 | int len = 0; |
| 389 | if (pTok[0] && 0 != (len = strlen(pTok[0]))) { |
| 390 | memcpy(&m_servers.x_def_domain[0], pTok[0], len); |
| 391 | m_servers.x_def_domain[len] = '\0'; |
| 392 | } |
| 393 | |
| 394 | return nullptr; |
| 395 | } |
| 396 | |
| 397 | /* -------------------------------------------------------------- |
| 398 | SplitDNSRecord::ProcessDomainSrchList() |
nothing calls this directly
no test coverage detected