eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

Fix and enhance error logging

Open michaelortmann opened this issue 1 year ago • 0 comments

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(): https://github.com/eggheads/eggdrop/blob/0f5599e1fafa97454dc7a8b147c6076638e95ba8/src/net.c#L574

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 avatar Jan 20 '25 12:01 michaelortmann