Changeset 85235 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jul 11, 2020 4:34:10 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
r82968 r85235 582 582 * @returns COM status code. 583 583 * @param aVmName The VM name or UUID. 584 * @param a SlotThe slot.584 * @param a_uSlot The slot. 585 585 * @param idMachine Where to return the VM UUID. 586 586 */ 587 HRESULT DHCPServer::i_vmNameToIdAndValidateSlot(const com::Utf8Str &aVmName, LONG aSlot, com::Guid &idMachine)588 { 589 if ( (ULONG)aSlot <= 32)587 HRESULT DHCPServer::i_vmNameToIdAndValidateSlot(const com::Utf8Str &aVmName, ULONG a_uSlot, com::Guid &idMachine) 588 { 589 if (a_uSlot <= 32) 590 590 { 591 591 /* Is it a UUID? */ … … 601 601 return hrc; 602 602 } 603 return setError(E_INVALIDARG, tr("NIC slot number (%d) is out of range (0..32)"), a Slot);603 return setError(E_INVALIDARG, tr("NIC slot number (%d) is out of range (0..32)"), a_uSlot); 604 604 } 605 605 … … 618 618 * @note Caller must not be holding any locks! 619 619 */ 620 HRESULT DHCPServer::i_vmNameAndSlotToConfig(const com::Utf8Str &a_strVmName, LONG a_uSlot, bool a_fCreateIfNeeded,620 HRESULT DHCPServer::i_vmNameAndSlotToConfig(const com::Utf8Str &a_strVmName, ULONG a_uSlot, bool a_fCreateIfNeeded, 621 621 ComObjPtr<DHCPIndividualConfig> &a_rPtrConfig) 622 622 { … … 1081 1081 if ( (aState.equals("acked") || aState.equals("offered") || aState.isEmpty()) 1082 1082 && secIssued + cSecsToLive < RTTimeSpecGetSeconds(RTTimeNow(&Now))) 1083 hrc = aState.assignNoThrow("expired");1083 hrc = RT_SUCCESS(aState.assignNoThrow("expired")) ? S_OK : E_OUTOFMEMORY; 1084 1084 return hrc; 1085 1085 }
Note:
See TracChangeset
for help on using the changeset viewer.