On Fri, 16 Nov 2007, Francesco Vertova wrote:

> Hi all,
> 
> apparently I have a problem with the new SysGetHostByName which 
> causes POP3-SMTP auth always to fail. This chainsaw patch works for me:
> 
> --- POP3Utils.cpp     2007-11-02 01:34:32.000000000 +0100
> +++ POP3Utils.cpp.new 2007-11-16 13:23:20.890625000 +0100
> @@ -1544,8 +1544,7 @@
>       /* Do IP matching */
>       SYS_INET_ADDR PrevAddr, CurrAddr;
> 
> -     if (SysGetHostByName(szIP, SysGetAddrFamily(CurrAddr), PrevAddr) < 0 ||
> -         !SysSameAddress(PrevAddr, CurrAddr)) {
> +     if (!SysSameAddress(PrevAddr, CurrAddr)) {
>               ErrSetErrorCode(ERR_NO_POP3_IP);
>               return ERR_NO_POP3_IP;
>       }
> 
> No idea:
> 
> - of side effects :-)
> - if this is everybody's problem;
> - if this is Windows problem;
> - if this is my problem ???

That was a bug, yes ;) but that code is randomly get ppl in dependently on 
the content of the stack :)
Can you try the patch below?


diff --git a/POP3Utils.cpp b/POP3Utils.cpp
index 85ee92d..5b3111b 100644
--- a/POP3Utils.cpp
+++ b/POP3Utils.cpp
@@ -1542,10 +1542,10 @@ int UPopUserIpCheck(UserInfo *pUI, SYS_INET_ADDR 
const *pPeerInfo, unsigned int
        fclose(pIpFile);
 
        /* Do IP matching */
-       SYS_INET_ADDR PrevAddr, CurrAddr;
+       SYS_INET_ADDR CurrAddr;
 
-       if (SysGetHostByName(szIP, SysGetAddrFamily(CurrAddr), PrevAddr) < 0 ||
-           !SysSameAddress(PrevAddr, CurrAddr)) {
+       if (SysGetHostByName(szIP, SysGetAddrFamily(*pPeerInfo), CurrAddr) < 0 
||
+           !SysSameAddress(*pPeerInfo, CurrAddr)) {
                ErrSetErrorCode(ERR_NO_POP3_IP);
                return ERR_NO_POP3_IP;
        }



- Davide


-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to