View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003288 | unreal | ircd | public | 2007-04-20 02:05 | 2007-04-24 13:46 |
Reporter | argvx | Assigned To | |||
Priority | normal | Severity | trivial | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
OS | FreeBSD | OS Version | 6.0 | ||
Product Version | 3.2.6 | ||||
Fixed in Version | 3.3-alpha0 | ||||
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. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
3rd party modules | |||||
|
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) |
|
Updated patch for 3.3 first was for 3.2.6. |
|
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 |
|
sorry, i`m forgot about char ;) fixed patch added, tested - it`s work. |
|
Patched in .2376 |
Date Modified | Username | Field | Change |
---|---|---|---|
2007-04-20 02:05 | argvx | New Issue | |
2007-04-20 02:05 | argvx | File Added: quitreaderrormsg.patch.gz | |
2007-04-20 10:06 |
|
Status | new => acknowledged |
2007-04-20 10:06 |
|
Status | acknowledged => confirmed |
2007-04-24 03:01 |
|
Note Added: 0013641 | |
2007-04-24 03:01 |
|
Status | confirmed => feedback |
2007-04-24 09:33 | argvx | File Added: readerrorquitmsg.patch.gz | |
2007-04-24 09:34 | argvx | Note Added: 0013662 | |
2007-04-24 11:47 |
|
Note Added: 0013663 | |
2007-04-24 12:10 | argvx | File Added: readerrorquitmsg-fixed.patch.gz | |
2007-04-24 12:11 | argvx | Note Added: 0013664 | |
2007-04-24 13:46 |
|
Status | feedback => resolved |
2007-04-24 13:46 |
|
Fixed in Version | => 3.3-alpha0 |
2007-04-24 13:46 |
|
Resolution | open => fixed |
2007-04-24 13:46 |
|
Assigned To | => stskeeps |
2007-04-24 13:46 |
|
Note Added: 0013665 |