y***@vms.huji.ac.il
2007-06-21 08:17:51 UTC
Helo,
I have a strange problem with Select() which I cannot find what I am doing
wrong. The problem started after upgrade from VMS 7.3-2 + Multinet 5.1 to
VMS-8.3 and Multinet 5.2 (with all the patches up to yesterday...).
Background: I am using VMS loginout callback API to verify the passwords
against an external server. I create a UDP session to the other side to
exchange the information. Sendto() and recvfrom() work ok but select() fails
only when it is called under DECW login (Telnet login works ok). From
intermediate printouts I see that the VMS channel number is different (usually
240 for Telnet, 896 for DECwindows login).
The code fragment is:
TableSize = getdtablesize(); /* For Select */
struct timeval TimeoutStruct; /* For Select's timeout */
fd_set ReadFds;
TimeoutStruct.tv_sec = UDP_READ_TIMEOUT; /* Set the timeout */
TimeoutStruct.tv_usec = 0;
FD_ZERO(&ReadFds);
FD_SET(s, &ReadFds);
status = multinet_select(s + 1, &ReadFds, NULL, NULL, &TimeoutStruct);
if(status <= 0) { /* Some error or timeout */
#ifdef DEBUG
socket_perror("Select");
#endif
return -1;
}
The error codes are: VMS errno: 8740, Unix errno: 5.
The same happens also when I replace the first argument from "s + 1" to
TableSize. Any idea what I am doing wrong here?
Thanks! __Yehavi:
I have a strange problem with Select() which I cannot find what I am doing
wrong. The problem started after upgrade from VMS 7.3-2 + Multinet 5.1 to
VMS-8.3 and Multinet 5.2 (with all the patches up to yesterday...).
Background: I am using VMS loginout callback API to verify the passwords
against an external server. I create a UDP session to the other side to
exchange the information. Sendto() and recvfrom() work ok but select() fails
only when it is called under DECW login (Telnet login works ok). From
intermediate printouts I see that the VMS channel number is different (usually
240 for Telnet, 896 for DECwindows login).
The code fragment is:
TableSize = getdtablesize(); /* For Select */
struct timeval TimeoutStruct; /* For Select's timeout */
fd_set ReadFds;
TimeoutStruct.tv_sec = UDP_READ_TIMEOUT; /* Set the timeout */
TimeoutStruct.tv_usec = 0;
FD_ZERO(&ReadFds);
FD_SET(s, &ReadFds);
status = multinet_select(s + 1, &ReadFds, NULL, NULL, &TimeoutStruct);
if(status <= 0) { /* Some error or timeout */
#ifdef DEBUG
socket_perror("Select");
#endif
return -1;
}
The error codes are: VMS errno: 8740, Unix errno: 5.
The same happens also when I replace the first argument from "s + 1" to
TableSize. Any idea what I am doing wrong here?
Thanks! __Yehavi: