2020-05-30 10:35 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000604Spring engineLinuxpublic2007-08-22 10:54
Reporterwcspxyx 
Assigned Toimbaczek 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000604: Compile error on Ubuntu/Gutsy
DescriptionWhen compiling latest trunk on ubuntu/gutsy, I get the following:

rts/System/Net/UDPConnection.cpp: In member function 'virtual int netcode::UDPConnection::GetData(unsigned char*, unsigned int)':
rts/System/Net/UDPConnection.cpp:125: error: 'struct boost::ptr_container_detail::ref_pair<int, netcode::RawPacket* const>' has no member named 'length'
rts/System/Net/UDPConnection.cpp:134: error: 'struct boost::ptr_container_detail::ref_pair<int, netcode::RawPacket* const>' has no member named 'data'
rts/System/Net/UDPConnection.cpp:134: error: 'struct boost::ptr_container_detail::ref_pair<int, netcode::RawPacket* const>' has no member named 'length'
rts/System/Net/UDPConnection.cpp:135: error: 'struct boost::ptr_container_detail::ref_pair<int, netcode::RawPacket* const>' has no member named 'length'
rts/System/Net/UDPConnection.cpp: In member function 'void netcode::UDPConnection::SendRawPacket(const unsigned char*, unsigned int, int)':
rts/System/Net/UDPConnection.cpp:277: error: 'class boost::ptr_map_iterator<std::_Rb_tree_iterator<std::pair<const int, void*> >, int, netcode::RawPacket* const>' has no member named 'key'
scons: *** [build/rts/System/Net/UDPConnection.o] Error 1
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • diff file icon UDPConnection.cpp.diff (1,817 bytes) 2007-08-21 07:18 -
    Index: rts/System/Net/UDPConnection.cpp
    ===================================================================
    --- rts/System/Net/UDPConnection.cpp	(revision 4233)
    +++ rts/System/Net/UDPConnection.cpp	(working copy)
    @@ -11,6 +11,7 @@
     
     #endif
     
    +#include "boost/version.hpp"
     #include "LogOutput.h"
     #include "GlobalStuff.h"
     //#include "Sync/Syncify.h"
    @@ -121,18 +122,24 @@
     		packetMap::iterator wpi;
     		//process all in order packets that we have waiting
     		while ((wpi = waitingPackets.find(lastInOrder+1)) != waitingPackets.end()) {
    -		//	if (readyLength + wpi->second->length >= length) {	// does only work with boost >= 1.34
    -			if (readyLength + (*wpi).length >= length) {	// does only work with boost < 1.34
    +#if (BOOST_VERSION >= 103400)
    +			if (readyLength + wpi->second->length >= length) {
    +#else
    +			if (readyLength + (*wpi).length >= length) {
    +#endif		
     				logOutput.Print("Overflow in incoming network buffer");
     				break;
     			}
     
     			lastInOrder++;
     
    -		//	memcpy(buf+readyLength,wpi->second->data,wpi->second->length);
    -		//	readyLength += (wpi->second)->length;
    +#if (BOOST_VERSION >= 103400)
    +			memcpy(buf+readyLength,wpi->second->data,wpi->second->length);
    +			readyLength += (wpi->second)->length;
    +#else
     			memcpy(buf + readyLength, (*wpi).data, (*wpi).length);
     			readyLength += (*wpi).length;
    +#endif		
     
     			waitingPackets.erase(wpi);
     		}
    @@ -274,7 +281,11 @@
     	*(int*)tempbuf = packetNum;
     	*(int*)(tempbuf+4) = lastInOrder;
     	if(!waitingPackets.empty() && waitingPackets.find(lastInOrder+1)==waitingPackets.end()){
    +#if (BOOST_VERSION >= 103400)
    +		int nak = (waitingPackets.begin()->first - 1) - lastInOrder;
    +#else
     		int nak = (waitingPackets.begin().key() - 1) - lastInOrder;
    +#endif
     		assert(nak >= 0);
     		if (nak <= 255)
     			*(unsigned char*)(tempbuf+8) = (unsigned char)nak;
    
    diff file icon UDPConnection.cpp.diff (1,817 bytes) 2007-08-21 07:18 +

-Relationships
+Relationships

-Notes

~0001144

wcspxyx (reporter)

Attached patch seems to fix issue.

~0001145

imbaczek (reporter)

committed in r4234, thanks.
+Notes

-Issue History
Date Modified Username Field Change
2007-08-21 04:51 wcspxyx New Issue
2007-08-21 04:51 wcspxyx Status new => assigned
2007-08-21 04:51 wcspxyx Assigned To => tvo
2007-08-21 07:18 wcspxyx File Added: UDPConnection.cpp.diff
2007-08-21 07:18 wcspxyx Note Added: 0001144
2007-08-21 10:20 imbaczek Status assigned => resolved
2007-08-21 10:20 imbaczek Resolution open => fixed
2007-08-21 10:20 imbaczek Note Added: 0001145
2007-08-22 10:54 tvo Status resolved => assigned
2007-08-22 10:54 tvo Assigned To tvo => imbaczek
2007-08-22 10:54 tvo Status assigned => resolved
+Issue History