Re: SCNetworkConnectionStart sometimes won't dial.
Re: SCNetworkConnectionStart sometimes won't dial.
- Subject: Re: SCNetworkConnectionStart sometimes won't dial.
- From: Dave Camp <email@hidden>
- Date: Wed, 19 May 2004 13:39:59 -0700
On May 18, 2004, at 6:50 AM, Jonathan Wight wrote:
I'm populating the network configuration via SCPreferenceRef with
information for a PPP network connection. I am not using MoreSCF but
have my own code that seems to be doing everything correctly.
Then I'm using the SCNetworkConnectionRef functions to try dial a PPP
server. However sometimes (1 in 5 maybe?) it refuses to dial and I get
an error saying that my network set is invalid (unfortunately I can't
reproduce the error right now so can't get the exact error, grrr!). I
can inspect the preferences set before and after the
SCNetworkConnectionStart function call and it looks perfectly valid to
me (just the same as the 4/5s of the time the connection works).
I've tried interfacing directly with the example code from PPPLib and
that has the same error too (I'd assume SCNetworkConnection talks to
the same PPPLib code).
I haven't seen the same problem if I use MoreSCF but I've gone over
MoreSCF and my code with a fine tooth comb and don't see anything in
MoreSCF that not doing.
This is (obviously) running under a 10.3 box (currently 10.3.3 but have
seen same problem on over releases) with the built-in 56K modem doing
the dial-up.
I don't know if this is related, but I'll throw it out and see what
happens...
Our app has had a long standing problem with the modem not being ready
to make a PPP call if we initiate the call immediately after creating
our network location. In other words, if we create our network location
with all of our PPP settings and then ask OT to start the PPP session,
it will almost always fail. Subsequent connections sometimes fail as
well.
What we discovered was that there is some amount of time we have to
wait after setting the network location before asking OT to start PPP.
Five seconds seems to cover all the cases, although the specific amount
of time needed seems to vary by machine model. With the delay in place,
calls work perfectly (other than the user complaints about slow PPP
connection times...)
We were hoping the new SCF PPP APIs in Panther would fix this, but we
have not had a chance to try them.
Dave
---
In English, every word can be verbed.
_______________________________________________
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.