[freetds] Connection timeout problem on HP-UX

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Wed Apr 11 10:21:13 EDT 2007


> 
> Hello,
>  
> I have solved the problem with connection timeout on HP-UX in 
> 0.63 version of FreeTDS driver. 
> I have debugged FreeTDS ODBC driver and I have detected the 
> problem in file login.c. The problem on HP-UX was in setting 
> of non-blocking socket by ioctl method. Because that the 
> socket remained blocking and connect method waited about 76 
> seconds... When I used fcntl method instead ioctl this 
> setting worked fine and connection timeout worked fine.
>  
> I have made the patch for file login.c with these changes 
> (attachment).
>  
> I have observed that in 0.64 version and current FreeTDS is 
> used ioctl method and I think that connection timeout will 
> not work on HP-UX nor with new timeout logic...
> I suggest that and these version of driver's should to use 
> fcntl method for HP-UX.
>  
> Also, I have tested freetds (0.63 and 0.64) on linux and I 
> have concluded that connection timeout 
> works fine and with ioctl method... 
>  
> Regards
> 

Some more notes... it appers that some system require a long* (Solaris?)
while others a int* (Linux/HP-UX) so there can be problems if
sizeof(long int) != sizeof(int). This can be the problem with HP-UX...
the same apply to ioctl...
Could you try if setting ioctl_blocking type to int resolve the problem
with HP-UX??

freddy77



More information about the FreeTDS mailing list