Changeset 6919 for source/ariba/utility
- Timestamp:
- Nov 13, 2009, 1:41:34 PM (15 years ago)
- Location:
- source/ariba/utility
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/addressing/endpoint_set.hpp
r6877 r6919 399 399 this->rfcomm = rhs.rfcomm; 400 400 this->tcp = rhs.tcp; 401 return *this; 401 402 } 402 403 -
source/ariba/utility/addressing/ip_address.hpp
r6841 r6919 166 166 } 167 167 168 169 168 bool is_multicast_site_local() const { 170 169 if (addr.is_v4()) return false; -
source/ariba/utility/bootstrap/modules/bluetoothsdp/BluetoothSdp.cpp
r5967 r6919 64 64 namespace utility { 65 65 66 static bdaddr_t bd_addr_any = {{0, 0, 0, 0, 0, 0}}; 67 static bdaddr_t bd_addr_local = {{0, 0, 0, 0xff, 0xff, 0xff}}; 68 66 69 use_logging_cpp(BluetoothSdp); 67 70 OverlayBootstrap* BluetoothSdp::CONNECTION_CHECKER = NULL; … … 216 219 // connect to the local SDP server, register the service record 217 220 if( sdp_session_ == NULL ){ 218 sdp_session_ = sdp_connect( BDADDR_ANY, BDADDR_LOCAL, SDP_RETRY_IF_BUSY);221 sdp_session_ = sdp_connect(&bd_addr_any, &bd_addr_local, SDP_RETRY_IF_BUSY); 219 222 } 220 223 … … 275 278 276 279 bdaddr_t address; 277 uint8_t channel;280 // uint8_t channel; 278 281 279 282 dev_id = hci_get_route(NULL); … … 339 342 char name[256], info1[256], info2[256], info3[256]; 340 343 341 session = sdp_connect( BDADDR_ANY, &target, SDP_RETRY_IF_BUSY);344 session = sdp_connect(&bd_addr_any, &target, SDP_RETRY_IF_BUSY); 342 345 343 346 if (session == NULL) { … … 401 404 * Returns a string holding the bt adress in human readable form. 402 405 */ 403 char addr[32] = { 0 };404 406 char str[32] = { 0 }; 405 407 ba2str(ba, str); -
source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h
r5973 r6919 197 197 public: 198 198 udp_server(boost::asio::io_service& io_service, ServiceList* _services, boost::mutex* _servicesmutex) 199 : s ervices(_services), servicesmutex(_servicesmutex),200 socket_v4(io_service), socket_v6(io_service) {199 : socket_v4(io_service), socket_v6(io_service), 200 services(_services), servicesmutex(_servicesmutex) { 201 201 202 202 if( open4() ) start_receive_4(); … … 350 350 351 351 { // insert new found service 352 boost::mutex::scoped_lock ( *servicesmutex );352 boost::mutex::scoped_lock lock( *servicesmutex ); 353 353 354 354 ServiceList::iterator it = services->find( msg.getName() ); -
source/ariba/utility/measurement/PathloadMeasurement.cpp
r5412 r6919 45 45 46 46 PathloadMeasurement::PathloadMeasurement(BaseOverlay* _overlay) 47 : running( false ), resultNode( NodeID::UNSPECIFIED ),48 listener( NULL),serverpid( -1 ) {47 : running( false ), listener( NULL), resultNode( NodeID::UNSPECIFIED ), 48 serverpid( -1 ) { 49 49 50 50 if( _overlay != NULL ) // this is important due to the singleton interface! … … 142 142 char buf[128]; 143 143 string content = ""; 144 bool failed = true;144 // bool failed = true; 145 145 146 146 while( fgets(buf, 100, stream) != NULL ){ -
source/ariba/utility/messages/Message.h
r6786 r6919 106 106 */ 107 107 explicit inline Message( const Data& data ) : 108 srcAddr(NULL),destAddr(NULL), releasePayload(true) {108 releasePayload(true), srcAddr(NULL),destAddr(NULL) { 109 109 this->payload = data.clone(); 110 110 // this->root = shared_array<uint8_t>((uint8_t*)data.getBuffer()); … … 246 246 } else { 247 247 if (msg->payload.isUnspecified()) { 248 size_t l = ((len == ~ 0) ? X.getRemainingLength() : len);248 size_t l = ((len == ~(size_t)0) ? X.getRemainingLength() : len); 249 249 msg->payload = X.getRemainingData(l); 250 250 msg->releasePayload = false; -
source/ariba/utility/messages/MessageProvider.cpp
r3690 r6919 49 49 bool MessageProvider::sendMessageToReceivers( const Message* message ) { 50 50 bool sent = false; 51 for ( int i=0; i<receivers.size(); i++)51 for (size_t i=0; i<receivers.size(); i++) 52 52 if (receivers[i]->receiveMessage(message, LinkID::UNSPECIFIED, NodeID::UNSPECIFIED)) sent = true; 53 53 return sent; … … 59 59 60 60 void MessageProvider::removeMessageReceiver( MessageReceiver* receiver ) { 61 for ( int i=0; i<receivers.size(); i++)61 for (size_t i=0; i<receivers.size(); i++) 62 62 if (receivers[i]==receiver) { 63 63 receivers.erase( receivers.begin()+i ); -
source/ariba/utility/serialization/DataStream.hpp
r5638 r6919 516 516 517 517 /* array and vector support */ 518 template<typename T >518 template<typename T, bool staticArray = false> 519 519 class ArrayTpl : public ExplicitSerializer { 520 520 private: … … 527 527 528 528 sznMethodBegin(X) 529 if (X.isDeserializer() ) v = new T[l];529 if (X.isDeserializer() && !staticArray) v = new T[l]; 530 530 for (size_t i=0; i<l; i++) X && v[i]; 531 531 sznMethodEnd() … … 556 556 finline ArrayTpl<T> A( T*& array, size_t length ) { 557 557 return ArrayTpl<T>(array,length); 558 } 559 560 template<typename T> 561 finline ArrayTpl<T,true> static_A( T*& array, size_t length ) { 562 return ArrayTpl<T, true>(array,length); 558 563 } 559 564 -
source/ariba/utility/system/SystemEvent.h
r3690 r6919 59 59 const void* data; //< data attached to the event 60 60 61 public: 61 public: 62 62 // TODO: these should be private, but the gcc 3.4 in scratchbox for cross-compiling 63 63 // for Maemo (Nokia N810) gets confused when the friend class SystemQueue has a … … 66 66 uint32_t delayTime; //< time the event is scheduled at, or 0 if it is to be fired immediately 67 67 uint32_t remainingDelay; //< remaining delay time for sleeping 68 68 69 69 public: 70 inline SystemEvent( 71 SystemEventListener* mlistener, 72 SystemEventType mtype = SystemEventType::DEFAULT, 73 void* mdata = NULL) 74 : scheduledTime(boost::posix_time::not_a_date_time), 75 delayTime(0), 76 remainingDelay(0), 77 listener(mlistener), 78 type(mtype), 79 data(mdata) { 70 inline SystemEvent(SystemEventListener* mlistener, SystemEventType mtype = 71 SystemEventType::DEFAULT, void* mdata = NULL) : 72 listener(mlistener), type(mtype), data(mdata), scheduledTime( 73 boost::posix_time::not_a_date_time), delayTime(0), 74 remainingDelay(0) 75 76 { 80 77 } 81 78 82 79 template<typename T> 83 inline SystemEvent( SystemEventListener* mlistener, 84 SystemEventType mtype = SystemEventType::DEFAULT, 85 T* mdata = NULL) 86 : scheduledTime(boost::posix_time::not_a_date_time), 87 delayTime(0), 88 remainingDelay(0), 89 listener(mlistener), 90 type(mtype), 91 data((void*)mdata) { 80 inline SystemEvent(SystemEventListener* mlistener, SystemEventType mtype = 81 SystemEventType::DEFAULT, T* mdata = NULL) : 82 listener(mlistener), type(mtype), data((void*) mdata), scheduledTime( 83 boost::posix_time::not_a_date_time), delayTime(0), 84 remainingDelay(0) { 92 85 } 93 94 95 86 96 87 inline SystemEvent(const SystemEvent& copy) { … … 126 117 template<typename T> 127 118 inline T* getData() const { 128 return (T*) *this;119 return (T*) *this; 129 120 } 130 121 … … 147 138 }; 148 139 149 }} // spovnet, common 140 } 141 } // spovnet, common 150 142 151 143 #endif /* SYSTEMEVENT_H_ */ -
source/ariba/utility/system/SystemQueue.cpp
r5316 r6919 125 125 126 126 SystemQueue::QueueThread::QueueThread(QueueThread* _transferQueue) 127 : running( false ), transferQueue( _transferQueue ) {127 : transferQueue( _transferQueue ), running( false ) { 128 128 } 129 129 -
source/ariba/utility/system/SystemQueue.h
r4702 r6919 234 234 #ifdef UNDERLAY_OMNET 235 235 236 #if 0 236 237 // 237 238 // the system queue must be a singleton in simulations, too. … … 243 244 // this is the macro definition from macros.h 244 245 // 245 // #define Define_Module(CLASSNAME) \246 // static cModule *CLASSNAME##__create() {return new CLASSNAME();} \246 // #define Define_Module(CLASSNAME) /backslash 247 // static cModule *CLASSNAME##__create() {return new CLASSNAME();} /backslash 247 248 // EXECUTE_ON_STARTUP(CLASSNAME##__mod, modtypes.instance()->add(new cModuleType(#CLASSNAME,#CLASSNAME,(ModuleCreateFunc)CLASSNAME##__create));) 248 249 // 249 250 // and this is how we do it :) 250 251 // 252 #endif 251 253 252 254 static cModule* SystemQueue__create() { -
source/ariba/utility/transport/tcpip/protlib/address.h
r5284 r6919 790 790 791 791 node *insert(netaddress &key, data_type &dat) { 792 node *a, *b , *c, *n, *m;793 int cmp , pos = 0;792 node *a, *b = NULL, *c, *n, *m; 793 int cmp = 0, pos = 0; 794 794 795 795 c = a = key.is_ipv4() ? v4head : v6head; -
source/ariba/utility/transport/tcpip/tcpip.cpp
r5718 r6919 183 183 datamsg->set_pos(0); 184 184 uint32_t message_size = datamsg->decode32(true)-2; 185 uint16_t remote_port = datamsg->decode16(true);185 //uint16_t remote_port = datamsg->decode16(true); 186 186 187 187 -
source/ariba/utility/types/Identifier.cpp
r4437 r6919 70 70 71 71 void Identifier::clearAddress() { 72 for ( int i = 0; i < array_size; i++)72 for (size_t i = 0; i < array_size; i++) 73 73 key[i] = 0; 74 74 isUnspec = false; … … 77 77 78 78 bool Identifier::setAddress(string address) { 79 // TODO79 return false; 80 80 } 81 81 … … 204 204 if (isUnspec) return std::string("<unspec>"); 205 205 206 char temp[ 80];206 char temp[250]; 207 207 if (base == 16) { 208 208 int k = 0; … … 238 238 } 239 239 #endif 240 return "<not supported>"; 240 241 } 241 242 -
source/ariba/utility/types/ServiceID.h
r3690 r6919 75 75 76 76 inline bool isUnspecified() const { 77 return (id==~ 0);77 return (id==~(uint32_t)0); 78 78 } 79 79 -
source/ariba/utility/visual/DddVis.cpp
r6900 r6919 125 125 order = ORDER_RANDOMLY; 126 126 break; 127 default: 128 break; 127 129 } 128 130
Note:
See TracChangeset
for help on using the changeset viewer.