*
* This only implements what's needed for Cygnus Kerberos -- a warped
* subset of UDP.
+ *
+ * Sep 24 1997 mjv: Changed PBControl -> PBControlSync
*
* Written by John Gilmore, Cygnus Support, June 1994.
* Adapted from:
pb.udppb.csParam.create.rcvBuffLen = UDPbuflen;
pb.udppb.csParam.create.notifyProc = NULL;
pb.udppb.csParam.create.localPort = 0;
-
- err = PBControl( (ParamBlockRec *) &pb.udppb, false );
+
+ err = PBControlSync( (ParamBlockRec *) &pb.udppb );
if (err) {
free (theUDP);
SOCKET_SET_ERRNO (EIO);
pb.tcppb.csParam.create.rcvBuff = theUDP->fRecvBuf;
pb.tcppb.csParam.create.rcvBuffLen = TCPbuflen;
pb.tcppb.csParam.create.notifyProc = NULL;
- err = PBControl((ParamBlockRec *)&pb,false);
+ err = PBControlSync((ParamBlockRec *)&pb);
if (err) {
free(theUDP);
SOCKET_SET_ERRNO (EIO);
pb.udppb.csCode = UDPRelease;
pb.udppb.udpStream = (StreamPtr) theUDP->fStream;
- (void) PBControl( (ParamBlockRec *) &pb.udppb, false );
+ (void) PBControlSync( (ParamBlockRec *) &pb.udppb );
}
break;
case SOCK_STREAM:
pb.tcppb.csCode = TCPRelease;
pb.tcppb.tcpStream = (StreamPtr) theUDP->fStream;
- (void) PBControl( (ParamBlockRec *) &pb.tcppb, false );
+ (void) PBControlSync( (ParamBlockRec *) &pb.tcppb );
}
break;
}
pb.csParam.send.sendLength = 0; // reserved
pb.csParam.send.remoteHost = to->sin_addr.s_addr;
- err = PBControl( (ParamBlockRec *) &pb, false );
+ err = PBControlSync( (ParamBlockRec *) &pb);
if (err != noErr) {
SOCKET_SET_ERRNO (EIO);
return SOCKET_ERROR;
pb.csParam.receive.timeOut = last_timeout.tv_sec;
pb.csParam.receive.secondTimeStamp = 0; // reserved
- err = PBControl( (ParamBlockRec *) &pb, false );
+ err = PBControlSync( (ParamBlockRec *) &pb);
if( err ) {
SOCKET_SET_ERRNO (EIO);
return SOCKET_ERROR;
if( pb.csParam.receive.rcvBuffLen ) {
pb.csCode = UDPBfrReturn;
- err = PBControl( (ParamBlockRec *) &pb, false );
+ err = PBControlSync( (ParamBlockRec *) &pb);
}
if (len < packet_len) {
pb.tcppb.csParam.open.security = 0;
pb.tcppb.csParam.open.optionCnt = 0;
pb.tcppb.csParam.open.userDataPtr = 0; /* jfm */
- err = PBControl((ParamBlockRec *)&pb.tcppb,false);
+ err = PBControlSync((ParamBlockRec *)&pb.tcppb);
if (err) {
SOCKET_SET_ERRNO (EINVAL);
return SOCKET_ERROR;
pb.tcppb.csParam.receive.rcvBuff = buf;
pb.tcppb.csParam.receive.rcvBuffLen = len;
pb.tcppb.tcpStream = theUDP->fStream;
- err = PBControl((ParamBlockRec *)&pb.tcppb,false);
+ err = PBControlSync((ParamBlockRec *)&pb.tcppb);
if (err) {
SOCKET_SET_ERRNO (EIO);
return SOCKET_ERROR;
pb.tcppb.csParam.send.urgentFlag = false;
pb.tcppb.csParam.send.wdsPtr = (Ptr) wds;
pb.tcppb.tcpStream = theUDP->fStream;
- err = PBControl((ParamBlockRec *)&pb.tcppb,false);
+ err = PBControlSync((ParamBlockRec *)&pb.tcppb);
if (err) {
SOCKET_SET_ERRNO (EIO);
return SOCKET_ERROR;
return 0;
pb.ioCRefNum = sock->fMacTCPRef;
pb.csCode = ipctlGetAddr;
- err = PBControl( (ParamBlockRec *) &pb, false );
+ err = PBControlSync( (ParamBlockRec *) &pb);
if (err) {
closesocket (sock);
SOCKET_SET_ERRNO (EIO);
err = OpenDriver( "\p.IPP", &refnum );
pb.ioCRefNum = refnum;
pb.csCode = ipctlGetAddr;
- err = PBControl( (ParamBlockRec *) &pb, false );
+ err = PBControlSync( (ParamBlockRec *) &pb);
if (err) {
SOCKET_SET_ERRNO (EIO);
return 0;
return -1;
pb.ioCRefNum = sock->fMacTCPRef;
pb.csCode = ipctlGetAddr;
- err = PBControl( (ParamBlockRec *) &pb, false );
+ err = PBControlSync( (ParamBlockRec *) &pb );
if (err) {
free (theUDP);
SOCKET_SET_ERRNO (EIO);