Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy dedicated server console output to file is broken #3639

Closed
DorpsGek opened this issue Feb 24, 2010 · 5 comments
Closed

Copy dedicated server console output to file is broken #3639

DorpsGek opened this issue Feb 24, 2010 · 5 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

dolly opened the ticket and wrote:

Copying console output of dedicated server to file (IConsoleWriteToLogFile) is broken (only zero length file is created and "cannot write to log file" error displayed) unless _settings_client.gui.show_date_in_logs is set to true.

Reported version: 1.0.0-RC1
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/3639
@DorpsGek
Copy link
Member Author

Rubidium wrote:

What OS is used? It seems to work fine for me.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3639#comment7620

@DorpsGek
Copy link
Member Author

dolly wrote:

Tested on windows 7 and windows vista. This is relevant part from console window (transcript.log was created, but is zero sized)...

dbg: [net] Map generation percentage complete: 90
dbg: [net] Map generation percentage complete: 95
dbg: [net] Map generated, starting game
script transcript.log
file output started to: transcript.log
dbg: [net] [udp] queried from 192.168.180.151
dbg: [net] [udp] queried from 192.168.180.151
dbg: [net] Client connected from 192.168.180.151 on frame 903
dbg: [net] Closed client connection 2
dbg: [net] Client connected from 192.168.180.151 on frame 973
*** Game paused (connecting clients)
cannot write to log file
*** Tst # 1 has joined the game (Client # 3)
*** Game unpaused (connecting clients)
dbg: [net] recv failed with error 10054
*** Tst # 1 has left the game (connection lost)
dbg: [net] Closed client connection 3

The problem seems to be in IConsoleWriteToLogFile.

  const char *header = GetLogPrefix();
  if (fwrite(header, strlen(header), 1, _iconsole_output_file) != 1 ||

GetLogPrefix() returns \0
and next fwrite returns 0


This comment was imported from FlySpray: https://bugs.openttd.org/task/3639#comment7621

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Does the attached diff fix the issue?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3639#comment7624

@DorpsGek
Copy link
Member Author

dolly wrote:

yes, this fixes it


This comment was imported from FlySpray: https://bugs.openttd.org/task/3639#comment7626

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Deferred

In r19252


This comment was imported from FlySpray: https://bugs.openttd.org/task/3639

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant