Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Incorrect bytes sent in netplay log #1936

Closed
wzdev-ci opened this issue Jun 20, 2010 · 13 comments
Closed

Incorrect bytes sent in netplay log #1936

wzdev-ci opened this issue Jun 20, 2010 · 13 comments

Comments

@wzdev-ci
Copy link
Contributor

resolution_fixed type_bug | by Safety0ff


Symptom:

Netplay log statistics claim that there was hundreds of megabytes sent.

Suspected cause of the problem:

When NETrecv(uint8_t *type) calls NETlogPacket, the byte order of NetMsg->size might be in network byte order.

Notes:

  • NETlogPacket assumes the size field has host byte order.
  • I'm not sure, but it looks like NETrecv doesn't count some packets towards the bytes/packets received count, I don't know whether this is intentional or not (NETlogPacket packet is only called when returning true e.g. when we've received a "high level" packet).
  • ntohs calls in NETrecv should be htons.
  • Magic number "8" in NETrecv might need to be changed to MAX_PLAYERS for clarity...
    I might try fixing this myself once I've stepped through that function a few times with a debugger ( currently I'm unsure about the design/structure of that function.)

Issue migrated from trac:1936 at 2022-04-15 22:03:11 -0700

@wzdev-ci
Copy link
Contributor Author

Safety0ff commented


Likely fixed in newnet.

@wzdev-ci
Copy link
Contributor Author

Buginator changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

Buginator set resolution to fixed

@wzdev-ci
Copy link
Contributor Author

Buginator commented


(In [11065]) Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes #1936

@wzdev-ci
Copy link
Contributor Author

Buginator commented


(In [11066]) Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes #1936
2.3: [11065]

@wzdev-ci
Copy link
Contributor Author

Buginator commented


(In [11067]) Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes #1936
2.3: [11065]

@wzdev-ci
Copy link
Contributor Author

Buginator commented


(In [11068]) Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes #1936
2.3: [11065]

@wzdev-ci
Copy link
Contributor Author

Git SVN Gateway <gateway@...> commented


(In Warzone2100/warzone2100@b4ae06d) Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes #1936
2.3: [11065]

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11066 4a71c877-e1ca-e34f-864e-861f7616d084

@wzdev-ci
Copy link
Contributor Author

Zarel commented


wtf guys

Did you seriously just break netcode compatibility without even mentioning it in ML, a ticket, the forums, or the commit log?

It should seriously have been in the commit log, and at least one of the other three.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 9, 2010

Git SVN Gateway <gateway@...> commented


In Warzone2100/warzone2100@b4ae06d:

#CommitTicketReference repository="" revision="b4ae06db779e587e0a85b52f9a3647e748bf21a9"
Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes #1936
2.3: [11065]

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11066 4a71c877-e1ca-e34f-864e-861f7616d084

1 similar comment
@wzdev-ci
Copy link
Contributor Author

Git SVN Gateway <gateway@...> commented


In Warzone2100/warzone2100@b4ae06d:

#CommitTicketReference repository="" revision="b4ae06db779e587e0a85b52f9a3647e748bf21a9"
Fix endian issues, byte & packet counts for the logging.
Info / modifications by Safety0ff & I

closes #1936
2.3: [11065]

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11066 4a71c877-e1ca-e34f-864e-861f7616d084

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2012

cybersphinx changed milestone from 3.0 to unspecified

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jan 3, 2012

cybersphinx commented


Milestone 3.0 deleted

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant