Internet Connection on OS X (PPP)
Internet Connection on OS X (PPP)
- Subject: Internet Connection on OS X (PPP)
- From: Payman <email@hidden>
- Date: Thu, 07 Nov 2002 14:59:42 +0100
Hi
My problem is connection errors
in OTNotifierProc i recieve always kOTNoError
- Try with wrong password nothing all is ok Display Disconnect OK ???
- Same thing with wrong phone number ...
here is my code simplified :
Init:
UOpenTptSupport::StartOpenTransport();
mEndPoint=::OTOpenEndpoint(::OTCreateConfiguration(kPPPControlName),0,nil,&err);
mEndPoint->InstallNotifier((OTNotifyProcPtr)otNotifierProc,(void*)this);
::OTSetAsynchronous(mEndPoint);
::OTIoctl(mEndPoint,I_OTGetMiscellaneousEvents,(void*)1);
::OTIoctl(mEndPoint,I_OTConnect,NULL);
pascal void ConnectionController::OTNotifierProc(ConnectionController
*inconCtrl,OTEventCode code,OTResult res,void *cookie)
{
#pragma unused (context)
#pragma unused (res)
CString strerr;
OTResult err;
switch (code)
{
case kOTSyncIdleEvent:
YieldToAnyThread();
break;
case kPPPConnectCompleteEvent:
err= ((OTResult )cookie); -> ALWAYS 0
if (err==1)
break;
if (err==kOTNoError)
{
inconCtrl->Display("Connect OK\n");
...
}
else
{
inconCtrl->Display("Connect fail\n");
}
inconCtrl->mConError=err;
inconCtrl->CloseDlgBox();
break;
case kPPPDisconnectCompleteEvent:
err= ((OTResult )cookie); -> ALWAYS 0
if (err==kOTNoError)
{
inconCtrl->Display("Disconnect OK\n");
...
}
else
{
inconCtrl->Display("Disconnect fail\n");
}
inconCtrl->mConError=err;
inconCtrl->CloseDlgBox();
break;
case kPPPAuthenticationStartedEvent:
Display("Start Authentication\n");
break;
case kPPPAuthenticationFinishedEvent:
err= ((OTResult )cookie); -> ALWAYS 0
if (err==kOTNoError)
{
inconCtrl->Display("Authentication OK\n");
...
}
else
{
inconCtrl->Display("Authentication fail\n");
}
break;
}
...
}
any thing wrong ?
this works under OS 9 ...
Is there other techno. for doing this ?
Thanks.
PS:
- There is no docs for this in apple docs just un PDF doc 1996
- ISP Application with CW8.2 & PowerPlant & SCF ...
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.