Re: Internet Connection on OS X (PPP)
Re: Internet Connection on OS X (PPP)
- Subject: Re: Internet Connection on OS X (PPP)
- From: Jens Bauer <email@hidden>
- Date: Thu, 7 Nov 2002 18:24:16 +0100
Hi Payman,
I'd recommend that you do not look at the cookie at all, but instead
look at the OTResult parameter (in this case you named the variable
'res').
Try dumping these codes, and see what happens.
On Thursday, Nov 7, 2002, at 14:59 Europe/Copenhagen, Payman wrote:
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,n
il,&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 ...
Love,
Jens
_______________________________________________
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.