Re (2): [Oberon] n-o PPP modifications

John Drake jmdrake_98 at yahoo.com
Mon Mar 7 17:58:20 CET 2005


--- easlab at absamail.co.za wrote:
> 
> So then trying: System.Free  PPPMain ~ ==
> PPPMain unloaded
> 
> and now it's possible to dial.
> I.e. the lock-effect is removed:--
> ]Dial script startedModem off-line, device 0 closed
> ]
> ]Sending [ATZ]
> ]Waiting 10s for [OK] {ATZ||OK}
> ]Sending [ATX]
> ]Waiting 10s for [OK] {|ATX||OK}
> ]Sending [ATM2D 3407501]
> ]Waiting 60s for [CONNECT] {|ATM2D 3407501||CONNECT}
> ]Calling [PPPMain.StartInst PPP 2nm4nx6x at za]
> 
> but not surprisingly I get:---
> TRAP -14  NIL reference ( 00000CBCH ) (PC Native
> 11.10.2001)
> PPPMain.StartInst  PC = 627
> 	S =  00000014H
> 	ao =  00000038H
> 	papname = "2nm4nx6x at za"
> 	pappasswd = "...
> ---------------
> 
> And that's why I was previously inspecting the
> interaction
> with the task switching mechanism.
> 
> Truely, I don't think even an in-depth understanding
> of PPP will
> solve this.
> 
> Apparently with a good/normal session completion,
> PPPMain
> is removed from the task-loop, but with an 'abort'
> it is not.
> If so, one would need to know about the task
> installation
> & deinstallation mechanism of n-o ?
> 
> The CO-laboration [i.e. division of labour, v. each
> one working
> privately] of n-o is less than optimum -- to envolve
> those with 
> knowledge of the tasking mechanism, but no interest
> in using,
> hence fixing, the n-o dial-in facilities.
> 
> == Chris Glur.

I used Oberon.Tasks in the PacMan game I wrote a
few years ago.  I noticed when I the main module
the task was still "alive".  Luckily using
Modules.InstallTermHandler you can tell a module
to take certain actions when it's unloaded.

>From a "cursory" inspection of PPPMain it seems
that the following code MIGHT fix the problem:

PROCEDURE CleanUp;	
BEGIN
  Oberon.Remove(ppp.task);
END CleanUp;

.....

BEGIN
  ppp := NIL;
  LCP.PPPHandleLCPUp:=LCPUp;
  LCP.PPPHandleLCPDown:=LCPDown; 
  LCP.PPPHandleProtRej:=LCPProtRej;
  IPCP.PPPHandleIPCPUp:=IPCPUp;
  IPCP.PPPHandleIPCPDown:=IPCPDown;
  HDLC.PPPHandleReceive:=Receive;
  Modules.InstallTermHandler(CleanUp);
END PPPMain.

Regards,

John M. Drake


	
		
__________________________________ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/



More information about the Oberon mailing list