VirtualBox

Changeset 64428 in vbox for trunk/src/libs


Ignore:
Timestamp:
Oct 26, 2016 12:35:20 PM (8 years ago)
Author:
vboxsync
Message:

xpcom/Runtime: introduced NS_ERROR_SOCKET_FAIL which is used for XPCOM socket errors at /tmp/.vbox-*-ipc/ipcd

Location:
trunk/src/libs/xpcom18a4
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcConnectionUnix.cpp

    r61402 r64428  
    420420  PRNetAddr addr;
    421421  PRSocketOptionData opt;
    422   nsresult rv = NS_ERROR_FAILURE;
     422  // don't use NS_ERROR_FAILURE as we want to detect these kind of errors
     423  // in the frontend
     424  nsresult rv = NS_ERROR_SOCKET_FAIL;
    423425
    424426  fd = PR_OpenTCPSocket(PR_AF_LOCAL);
     
    480482  if (NS_FAILED(rv))
    481483  {
    482     rv = IPC_SpawnDaemon(daemonPath);
     484    nsresult rv1 = IPC_SpawnDaemon(daemonPath);
     485    if (NS_SUCCEEDED(rv1) || rv != NS_ERROR_SOCKET_FAIL)
     486      rv = rv1;
    483487    if (NS_SUCCEEDED(rv))
    484488      rv = TryConnect(&fd);
  • trunk/src/libs/xpcom18a4/xpcom/base/nsError.h

    r34653 r64428  
    215215#define NS_ERROR_FACTORY_EXISTS            (NS_ERROR_BASE + 0x100)
    216216
     217/* Socket failures */
     218#define NS_ERROR_SOCKET_FAIL               (NS_ERROR_BASE + 0x200)
     219
    217220
    218221/* For COM compatibility reasons, we want to use exact error code numbers
  • trunk/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp

    r47778 r64428  
    19621962    {
    19631963        // Translate error values
    1964         rv = NS_ERROR_FACTORY_NOT_REGISTERED;
     1964        if (rv != NS_ERROR_SOCKET_FAIL)
     1965            rv = NS_ERROR_FACTORY_NOT_REGISTERED;
    19651966    }
    19661967
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