VirtualBox

Ignore:
Timestamp:
Jul 9, 2019 1:21:16 AM (5 years ago)
Author:
vboxsync
Message:

Dhcpd: DHCP_LOG_MSG_ERROR. bugref:9288

Location:
trunk/src/VBox/NetworkServices/Dhcpd
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/Dhcpd/Config.cpp

    r79621 r79622  
    108108        rc = m_strHome.assignNoThrow(szHome);
    109109    else
    110     {
    111         LogFunc(("unable to locate the VirtualBox home directory: %Rrc", rc)); /* no release log at this point. */
    112         RTMsgError("unable to locate the VirtualBox home directory: %Rrs", rc);
    113     }
     110        DHCP_LOG_MSG_ERROR(("unable to locate the VirtualBox home directory: %Rrc\n", rc));
    114111    return rc;
    115112}
     
    587584    if (pszFileName == NULL || pszFileName[0] == '\0')
    588585    {
    589         RTMsgError("Empty configuration filename");
     586        DHCP_LOG_MSG_ERROR(("Config::i_read: Empty configuration filename\n"));
    590587        return NULL;
    591588    }
     
    599596    catch (const xml::EIPRTFailure &e)
    600597    {
    601         LogFunc(("%s\n", e.what()));
    602         RTMsgError("%s\n", e.what());
     598        DHCP_LOG_MSG_ERROR(("Config::i_read: %s\n", e.what()));
    603599        return NULL;
    604600    }
    605601    catch (const RTCError &e)
    606602    {
    607         LogFunc(("%s\n", e.what()));
    608         RTMsgError("%s\n", e.what());
     603        DHCP_LOG_MSG_ERROR(("Config::i_read: %s\n", e.what()));
    609604        return NULL;
    610605    }
    611606    catch (...)
    612607    {
    613         LogFunc(("Unknown exception while reading and parsing '%s'\n", pszFileName));
    614         RTMsgError("Unknown exception while reading and parsing '%s'\n", pszFileName);
     608        DHCP_LOG_MSG_ERROR(("Config::i_read: Unknown exception while reading and parsing '%s'\n", pszFileName));
    615609        return NULL;
    616610    }
     
    625619    catch (const RTCError &e)
    626620    {
    627         LogFunc(("%s\n", e.what()));
    628         RTMsgError("%s\n", e.what());
     621        DHCP_LOG_MSG_ERROR(("Config::i_read: %s\n", e.what()));
    629622        return NULL;
    630623    }
    631624    catch (std::bad_alloc &)
    632625    {
    633         LogFunc(("std::bad_alloc\n"));
    634         RTMsgError("std::bad_alloc reading config\n");
     626        DHCP_LOG_MSG_ERROR(("Config::i_read: std::bad_alloc\n"));
    635627        return NULL;
    636628    }
    637629    catch (...)
    638630    {
    639         LogFunc(("Unexpected exception\n"));
    640         RTMsgError("Unexpected exception\n");
     631        DHCP_LOG_MSG_ERROR(("Config::i_read: Unexpected exception\n"));
    641632        return NULL;
    642633    }
  • trunk/src/VBox/NetworkServices/Dhcpd/DHCPD.cpp

    r79621 r79622  
    5353            return VINF_SUCCESS;
    5454
    55         /** @todo macro for this: */
    56         LogRel((   "Ran out of memory loading leases from '%s'.  Try rename or delete the file.\n",
    57                    pConfig->getLeasesFilename().c_str()));
    58         RTMsgError("Ran out of memory loading leases from '%s'.  Try rename or delete the file.\n",
    59                    pConfig->getLeasesFilename().c_str());
     55        DHCP_LOG_MSG_ERROR(("Ran out of memory loading leases from '%s'.  Try rename or delete the file.\n",
     56                            pConfig->getLeasesFilename().c_str()));
    6057    }
    6158    return rc;
  • trunk/src/VBox/NetworkServices/Dhcpd/DhcpdInternal.h

    r79568 r79622  
    7878/** @} */
    7979
     80/** LogRel + RTMsgError helper. */
     81#define DHCP_LOG_MSG_ERROR(a_MsgArgs)       do { LogRel(a_MsgArgs);     RTMsgError a_MsgArgs; } while (0)
     82
    8083#endif /* !VBOX_INCLUDED_SRC_Dhcpd_DhcpdInternal_h */
  • trunk/src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp

    r79568 r79622  
    380380        else
    381381        {
    382             LogRel(("ifWait failed: %Rrc\n", rc));
    383             RTMsgError("ifWait failed: %Rrc", rc);
     382            DHCP_LOG_MSG_ERROR(("ifWait failed: %Rrc\n", rc));
    384383            return;
    385384        }
     
    663662            }
    664663            else
    665                 RTMsgError("Terminating - vboxLwipCoreInitialize failed: %Rrc", rc);
     664                DHCP_LOG_MSG_ERROR(("Terminating - vboxLwipCoreInitialize failed: %Rrc\n", rc));
    666665        }
    667666        else
    668             RTMsgError("Terminating - ifInit failed: %Rrc", rc);
     667            DHCP_LOG_MSG_ERROR(("Terminating - ifInit failed: %Rrc\n", rc));
    669668    }
    670669    else
    671         RTMsgError("Terminating - Dhcpd::init failed: %Rrc", rc);
     670        DHCP_LOG_MSG_ERROR(("Terminating - Dhcpd::init failed: %Rrc\n", rc));
    672671    return rc;
    673672}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette