1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 19:14:46 +02:00

- Fixed a openssl+ipv6 bug, pointed out by Aragon .. This probably breaks some other crap, but what

the heck..
This commit is contained in:
stskeeps
2002-05-25 16:56:59 +00:00
parent 1f75896d56
commit f8865a5aa1
3 changed files with 7 additions and 22 deletions
+2
View File
@@ -1302,3 +1302,5 @@ seen. gmtime warning still there
- Removed some SOCKS scanner debug code that was forgotten
- Finally REALLY fixed the scanner (note to Stskeeps: bcmp returns 0 when there IS a match)
- Added OpenIRC-CA in .SICI
- Fixed a openssl+ipv6 bug, pointed out by Aragon .. This probably breaks some other crap, but what
the heck..
+4 -15
View File
@@ -1300,20 +1300,12 @@ static int read_packet(aClient *cptr, fd_set *rfd)
!(IsPerson(cptr) && DBufLength(&cptr->recvQ) > 6090))
{
SET_ERRNO(0);
#ifdef INET6
length = recvfrom(cptr->fd, readbuf, sizeof(readbuf), 0, 0, 0);
#else
#ifndef USE_SSL
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
#else
#ifdef USE_SSL
if (cptr->flags & FLAGS_SSL)
length = SSL_read((SSL *)cptr->ssl, readbuf, sizeof(readbuf));
else
#endif
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
#endif
#endif
cptr->lasttime = now;
if (cptr->lasttime > cptr->since)
cptr->since = cptr->lasttime;
@@ -1471,15 +1463,12 @@ static int read_packet(aClient *cptr)
{
errno = 0;
#ifndef USE_SSL
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
#else
#ifdef USE_SSL
if (cptr->flags & FLAGS_SSL)
length = SSL_read((SSL *)cptr->ssl, readbuf, sizeof(readbuf));
else
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
#endif
length = recv(cptr->fd, readbuf, sizeof(readbuf), 0);
cptr->lasttime = now;
if (cptr->lasttime > cptr->since)
cptr->since = cptr->lasttime;
+1 -7
View File
@@ -86,14 +86,8 @@ int deliver_it(aClient *cptr, char *str, int len)
if (cptr->flags & FLAGS_SSL)
retval = SSL_write((SSL *)cptr->ssl, str, len);
else
#endif
retval = send(cptr->fd, str, len, 0);
#else
#ifndef INET6
retval = send(cptr->fd, str, len, 0);
#else
retval = sendto(cptr->fd, str, len, 0, 0, 0);
#endif
#endif
/*
** Convert WOULDBLOCK to a return of "0 bytes moved". This
** should occur only if socket was non-blocking. Note, that