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

Fix putlog timestamp: localtime() -> localtime_r() #1441

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Mar 14, 2023

Found by: Arno
Patch by: michaelortmann
Fixes:

One-line summary:
Fix putlog timestamp: localtime() -> localtime_r()

Additional description (if needed):
No, eggdrop didnt invent the time machine, it just suffered from thread-unsafe localtime():
[21:55:36] Writing user file...
[21:55:35] Writing channel file...
This bug was introduced in 2019 by my very self:
5b395f2

Also this patch replaces ctime() with ctime_r()

Test cases demonstrating functionality (if applicable):

@michaelortmann michaelortmann changed the title Fix putlog timestamp: localtime() -> localtime_r() (WIP) Fix putlog timestamp: localtime() -> localtime_r() Mar 14, 2023
@michaelortmann michaelortmann changed the title (WIP) Fix putlog timestamp: localtime() -> localtime_r() Fix putlog timestamp: localtime() -> localtime_r() Mar 14, 2023
michaelortmann pushed a commit to michaelortmann/eggdrop that referenced this pull request Nov 21, 2023
michaelortmann pushed a commit to michaelortmann/eggdrop that referenced this pull request Nov 21, 2023
@michaelortmann michaelortmann mentioned this pull request Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant