Changeset 50213 in vbox for trunk/src/VBox/NetworkServices/NetLib
- Timestamp:
- Jan 24, 2014 8:23:12 AM (11 years ago)
- Location:
- trunk/src/VBox/NetworkServices/NetLib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NetLib/ComHostUtils.cpp
r49830 r50213 122 122 * variant but it's C++11. 123 123 */ 124 int hostDnsServers(const ComHostPtr& host, const RTNETADDRIPV4& networkid, 124 int hostDnsServers(const ComHostPtr& host, const RTNETADDRIPV4& networkid, 125 125 /*const*/ AddressToOffsetMapping& mapping, AddressList& servers) 126 126 { … … 166 166 167 167 ComBstrArray strs; 168 if (SUCCEEDED(host->COMGETTER(SearchStrings)(ComSafeArrayAsOutParam(strs)))) 168 if (SUCCEEDED(host->COMGETTER(SearchStrings)(ComSafeArrayAsOutParam(strs)))) 169 169 { 170 170 for (unsigned int i = 0; i < strs.size(); ++i) … … 193 193 194 194 195 int createNatListener(ComNatListenerPtr& listener, const ComVirtualBoxPtr& vboxptr, 195 int createNatListener(ComNatListenerPtr& listener, const ComVirtualBoxPtr& vboxptr, 196 196 NATNetworkEventAdapter *adapter, /* const */ ComEventTypeArray& events) 197 197 { -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp
r49842 r50213 726 726 { 727 727 AssertMsgReturn(isMainNeeded(), ("It's expected that we need Main"), VERR_INTERNAL_ERROR); 728 728 729 729 /* start receiving thread */ 730 730 int rc = RTThreadCreate(&m->m_hThrRecv, /* thread handle*/ … … 743 743 { 744 744 m->m_EventQ->processEventQueue(0); 745 745 746 746 if (m->fShutdown) 747 747 break; -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
r49842 r50213 57 57 }; 58 58 59 # ifndef BASE_SERVICES_ONLY 59 # ifndef BASE_SERVICES_ONLY 60 60 class VBoxNetBaseService: public VBoxNetHlpUDPService, public VBoxNetLockee 61 61 { -
trunk/src/VBox/NetworkServices/NetLib/shared_ptr.h
r49339 r50213 3 3 4 4 #ifdef __cplusplus 5 template<typename T> 5 template<typename T> 6 6 class SharedPtr 7 7 { 8 struct imp 8 struct imp 9 9 { 10 10 imp(T *pTrg = NULL, int cnt = 1): ptr(pTrg),refcnt(cnt){} … … 15 15 }; 16 16 17 17 18 18 public: 19 19 SharedPtr(T *t = NULL):p(NULL) … … 21 21 p = new imp(t); 22 22 } 23 23 24 24 ~SharedPtr() 25 25 { … … 40 40 { 41 41 if (p == rhs.p) return *this; 42 42 43 43 p->refcnt--; 44 if (p->refcnt == 0) 44 if (p->refcnt == 0) 45 45 delete p; 46 46 … … 57 57 } 58 58 59 59 60 60 T *operator->() 61 61 { … … 63 63 } 64 64 65 65 66 66 const T*operator->() const 67 67 { … … 79 79 }; 80 80 #endif 81 81 82 #endif -
trunk/src/VBox/NetworkServices/NetLib/utils.h
r49825 r50213 33 33 typedef std::map<RTNETADDRIPV4, int> AddressToOffsetMapping; 34 34 35 35 36 36 inline bool isDhcpRequired(const ComNatPtr& nat) 37 37 { … … 39 39 if (FAILED(nat->COMGETTER(NeedDhcpServer)(&fNeedDhcpServer))) 40 40 return false; 41 41 42 42 return fNeedDhcpServer; 43 43 } … … 49 49 dhcp.asOutParam()); 50 50 AssertComRCReturn(hrc, VERR_NOT_FOUND); 51 51 52 52 return VINF_SUCCESS; 53 53 } … … 60 60 61 61 AssertComRCReturn(hrc, VERR_NOT_FOUND); 62 62 63 63 return VINF_SUCCESS; 64 64 } … … 120 120 typedef ListenerImpl<NATNetworkListener, NATNetworkEventAdapter*> NATNetworkListenerImpl; 121 121 122 # if VBOX_WITH_XPCOM 122 # if VBOX_WITH_XPCOM 123 123 class NS_CLASSINFO_NAME(NATNetworkListenerImpl); 124 124 # endif … … 127 127 typedef com::SafeArray<VBoxEventType_T> ComEventTypeArray; 128 128 129 /* XXX: const is commented out because of compilation erro on Windows host, but it's intended that this function 129 /* XXX: const is commented out because of compilation erro on Windows host, but it's intended that this function 130 130 isn't modify event type array */ 131 int createNatListener(ComNatListenerPtr& listener, const ComVirtualBoxPtr& vboxptr, 131 int createNatListener(ComNatListenerPtr& listener, const ComVirtualBoxPtr& vboxptr, 132 132 NATNetworkEventAdapter *adapter, /* const */ ComEventTypeArray& events); 133 133 #endif
Note:
See TracChangeset
for help on using the changeset viewer.