Skip to content

Fix and enhance error logging #1743

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

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

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Jan 20, 2025

Found by: tuvok81
Patch by: michaelortmann
Fixes: #1742

One-line summary:

Additional description (if needed):
if .oidentd.conf doesnt exist (yet), eggdrop will create it. This case is not an error and should not be logged as one.

Also save (and restore) errno before check_tcl_event(ident): check_tcl_event(ident) for not loosing errno set by connect():

rc = connect(sock, &addr->addr.sa, addr->addrlen);

Test cases demonstrating functionality (if applicable):

loadmodule ident
set ident-method 0

Before:

rm ~/.oidentd.conf
$ ./eggdrop -t BotA.conf
[...]
[14:11:46] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 6697 ssl 1
[14:11:46] IDENT: oident.conf missing, or error opening for reading
[14:11:46] Failed connect to 127.0.0.1 (No such file or directory)

After:

rm ~/.oidentd.conf
$ ./eggdrop -t BotA.conf
[...]
[14:12:32] net: open_telnet_raw(): idx 4 host 127.0.0.1 ip 127.0.0.1 port 6697 ssl 1
[14:12:32] net: attempted socket connection refused: 127.0.0.1:6697
[14:12:32] Failed connect to 127.0.0.1 (Connection refused)

@michaelortmann michaelortmann changed the title (WIP) Enhance error logging Enhance error logging Jan 20, 2025
@michaelortmann michaelortmann changed the title Enhance error logging Fix and enhance error logging Jan 20, 2025
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.

wired error message on first start
1 participant