View Issue Details

IDProjectCategoryView StatusLast Update
0003288unrealircdpublic2007-04-24 13:46
ReporterfbiAssigned Tostskeeps 
PrioritynormalSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSFreeBSDOS Version6.0
Product Version3.2.6 
Target VersionFixed in Version3.3-alpha0 
Summary0003288: read error preffix in quit msg if socket error on read
Descriptionthis 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.
TagsNo tags attached.
3rd party modules

Activities

2007-04-20 02:05

 

quitreaderrormsg.patch.gz (616 bytes)

stskeeps

2007-04-24 03:01

reporter   ~0013641

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)

2007-04-24 09:33

 

readerrorquitmsg.patch.gz (458 bytes)

fbi

2007-04-24 09:34

reporter   ~0013662

Updated patch for 3.3
first was for 3.2.6.

stskeeps

2007-04-24 11:47

reporter   ~0013663

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

2007-04-24 12:10

 

readerrorquitmsg-fixed.patch.gz (565 bytes)

fbi

2007-04-24 12:11

reporter   ~0013664

sorry, i`m forgot about char ;)
fixed patch added, tested - it`s work.

stskeeps

2007-04-24 13:46

reporter   ~0013665

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 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