mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-21 08:29:59 +00:00
Fixed segfault (#654)
This commit is contained in:
parent
c80e010196
commit
0a55680a50
@ -72,6 +72,10 @@ bool SCSIBR::Init(const map<string, string>& params)
|
||||
// TAP Driver Generation
|
||||
tap = new CTapDriver(GetParam("interfaces"));
|
||||
m_bTapEnable = tap->Init();
|
||||
if (!m_bTapEnable){
|
||||
LOGERROR("Unable to open the TAP interface");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Generate MAC Address
|
||||
memset(mac_addr, 0x00, 6);
|
||||
|
@ -698,7 +698,7 @@ bool Attach(const CommandContext& context, const PbDeviceDefinition& pb_device,
|
||||
if (!device->Init(params)) {
|
||||
delete device;
|
||||
|
||||
return ReturnStatus(context, false, "Initialization of " + device->GetType() + " device, ID " +to_string(id) +
|
||||
return ReturnStatus(context, false, "Initialization of " + PbDeviceType_Name(type) + " device, ID " +to_string(id) +
|
||||
", unit " +to_string(unit) + " failed");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user