diff options
Diffstat (limited to 'user_channel/channel_layer.cpp')
-rw-r--r-- | user_channel/channel_layer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp index 4cab58f..12b10c9 100644 --- a/user_channel/channel_layer.cpp +++ b/user_channel/channel_layer.cpp @@ -28,9 +28,9 @@ bool doesDeviceExist(const uint8_t chNum) // TODO: This is not the reliable way to find the device // associated with ethernet interface as the channel number to // eth association is not done. Need to revisit later - struct stat fileStat; - std::string devName("/sys/class/net/eth"); - devName += std::to_string(chNum - 1); + struct stat fileStat = {0}; + std::string devName("/sys/class/net/" + + getChannelConfigObject().getChannelName(chNum)); if (stat(devName.data(), &fileStat) != 0) { |