Changeset 71703 in vbox for trunk/src/VBox/NetworkServices/Dhcpd
- Timestamp:
- Apr 6, 2018 12:24:46 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 121800
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/Dhcpd/DhcpOptions.h
r71689 r71703 342 342 static OptValue *parse(const char *pcszValue) 343 343 { 344 345 346 347 348 344 value_t v; 345 int rc = DhcpOption::parse1(v, pcszValue); 346 if (RT_FAILURE(rc)) 347 return NULL; 348 return new OptValue(v); 349 349 } 350 350 }; … … 432 432 static OptString *parse(const char *pcszValue) 433 433 { 434 434 return new OptString(pcszValue); 435 435 } 436 436 }; … … 544 544 static OptList *parse(const char *pcszValue) 545 545 { 546 547 548 549 550 546 value_t v; 547 int rc = DhcpOption::parseList(v, pcszValue); 548 if (RT_FAILURE(rc) || v.empty()) 549 return NULL; 550 return new OptList(v); 551 551 } 552 552 }; … … 587 587 { 588 588 octets_t::const_iterator beg(src.begin()); 589 590 591 592 593 589 octets_t data(beg, beg + cb); 590 m_Data.swap(data); 591 592 m_fPresent = true; 593 return VINF_SUCCESS; 594 594 } 595 595 … … 597 597 static RawOption *parse(uint8_t aOptCode, const char *pcszValue) 598 598 { 599 600 601 602 603 599 octets_t data; 600 int rc = DhcpOption::parseHex(data, pcszValue); 601 if (RT_FAILURE(rc)) 602 return NULL; 603 return new RawOption(aOptCode, data); 604 604 } 605 605 };
Note:
See TracChangeset
for help on using the changeset viewer.