UnrealIRCd Bug Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003288 [unreal] ircd trivial always 2007-04-20 02:05 2007-04-24 13:46
Reporter fbi View Status public  
Assigned To stskeeps
Priority normal Resolution fixed  
Status resolved   Product Version 3.2.6
Summary 0003288: read error preffix in quit msg if socket error on read
Description this patch add preffix "Read error:" (Read error: sockerror for read) for example how with write error (Write error: sockerror for write)..
or just "Remote host closed the connection" instead of "Client Quit" if no sockerror detected..
I think it must be in unreal by default..
patch has been tested in my network 4 months - no crashes or errors was found.
Additional Information
Tags No tags attached.
3rd party modules
QA Not touched yet by developer
U4: Need for upstream patch No need for upstream InspIRCd patch
U4: Upstream notification of bug Not decided
U4: Contributor working on this None
Attached Files gz file icon quitreaderrormsg.patch.gz [^] (616 bytes) 2007-04-20 02:05
gz file icon readerrorquitmsg.patch.gz [^] (458 bytes) 2007-04-24 09:33
gz file icon readerrorquitmsg-fixed.patch.gz [^] (565 bytes) 2007-04-24 12:10

- Relationships
child of 0003049confirmed 3.3 Suggestions/Features 

-  Notes
(0013641)
stskeeps (reporter)
2007-04-24 03:01

Patch broken (2007-04-20, 02:05):
***************
*** 2202,2212 ****
                        if (IsDead(cptr) || write_err)
                        {

- (void)exit_client(cptr, cptr, &me,
- ((sockerr =
- get_sockerr(cptr)) ? STRERROR(sockerr) :
- "Client exited"));
                                continue;
                        }
                }

--- 2214,2230 ----
                        if (IsDead(cptr) || write_err)
                        {

+ if (!(sockerr = get_sockerr(cptr)))
+ {
+ ircsprintf(errmsg, "%s", "Remote host closed the connection");
+ exit_client(cptr, cptr, &me, errmsg);
                                continue;
+ } else {
+ ircsprintf(errmsg, "Read error: %s",
+ STRERROR(sockerr));
+ exit_client(cptr, cptr, &me, errmsg);
+ continue;
+ }
                        }
                }

***************
*** 2253,2261 ****
                                report_error("Lost connection to %s:%s", cptr);
                }
                if (length != FLUSH_BUFFER)
- (void)exit_client(cptr, cptr, &me,
- ((sockerr = get_sockerr(cptr))
- ? STRERROR(sockerr) : "Client exited"));

        }
        return 0;
--- 2271,2285 ----
                                report_error("Lost connection to %s:%s", cptr);
                }
                if (length != FLUSH_BUFFER)
+ if (!(sockerr = get_sockerr(cptr)))
+ {
+ ircsprintf(errmsg, "%s", "Remote host closed the connection");
+ exit_client(cptr, cptr, &me, errmsg);
+ } else {
+ ircsprintf(errmsg, "Read error: %s",
+ STRERROR(sockerr));
+ exit_client(cptr, cptr, &me, errmsg);
+ }

        }
        return 0;

------------
Please cvs up -P -d -r devel and make the patch towards this (3.3-alpha0)
(0013662)
fbi (reporter)
2007-04-24 09:34

Updated patch for 3.3
first was for 3.2.6.
(0013663)
stskeeps (reporter)
2007-04-24 11:47

gcc -I../include -I/export/home/stskeeps/projects/unreal/extras/regexp/include -I/export/home/stskeeps/projects/unreal/extras/c-ares/include -L../extras/c-ares/lib -pipe -g -O2 -funsigned-char -fno-strict-aliasing -Wno-pointer-sign -export-dynamic -D_SOLARIS -c s_bsd.c
s_bsd.c: In function 'read_message':
s_bsd.c:1756: error: 'errmsg' undeclared (first use in this function)
s_bsd.c:1756: error: (Each undeclared identifier is reported only once
s_bsd.c:1756: error: for each function it appears in.)
make[1]: *** [s_bsd.o] Error 1
make[1]: Leaving directory `/export/home/stskeeps/projects/unreal/src'
make: *** [build] Error 2
(0013664)
fbi (reporter)
2007-04-24 12:11

sorry, i`m forgot about char ;)
fixed patch added, tested - it`s work.
(0013665)
stskeeps (reporter)
2007-04-24 13:46

Patched in .2376

- Issue History
Date Modified Username Field Change
2007-04-20 02:05 fbi New Issue
2007-04-20 02:05 fbi File Added: quitreaderrormsg.patch.gz
2007-04-20 10:06 stskeeps Relationship added child of 0003049
2007-04-20 10:06 stskeeps Status new => acknowledged
2007-04-20 10:06 stskeeps Status acknowledged => confirmed
2007-04-24 03:01 stskeeps Note Added: 0013641
2007-04-24 03:01 stskeeps Status confirmed => feedback
2007-04-24 09:33 fbi File Added: readerrorquitmsg.patch.gz
2007-04-24 09:34 fbi Note Added: 0013662
2007-04-24 11:47 stskeeps Note Added: 0013663
2007-04-24 12:10 fbi File Added: readerrorquitmsg-fixed.patch.gz
2007-04-24 12:11 fbi Note Added: 0013664
2007-04-24 13:46 stskeeps Status feedback => resolved
2007-04-24 13:46 stskeeps Fixed in Version => 3.3-alpha0
2007-04-24 13:46 stskeeps Resolution open => fixed
2007-04-24 13:46 stskeeps Assigned To => stskeeps
2007-04-24 13:46 stskeeps Note Added: 0013665


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker