From: bear@harlqn.co.uk (Andy Edwards)
Newsgroups: comp.protocols.appletalk
Subject: Re: help with lwpr
Date: 7 Apr 92 17:25:59 GMT
Distribution: comp
Organization: Harlequin Limited, Cambridge, England


Hi!

>Path: harlqn!uknet!mcsun!uunet!spool.mu.edu!umn.edu!noc.MR.NET!uc.msc.edu!apctrc!voyager!wsc!zanm03
>From: zanm03@amoco.com (Anthony Mutiso)
>Newsgroups: comp.protocols.appletalk
>Subject: help with lwpr
>Message-ID: <ZANM03.92Apr1073221@calw0057.amoco.com>
>Date: 1 Apr 92 13:32:21 GMT
>Sender: news@hou.amoco.com
>Distribution: comp
>Organization: /usr/calw0057/users/zanm03/Mailfolders/organization

Some strange organisation, huh?

>Lines: 201
>X-Zippy: I know how to do SPECIAL EFFECTS!!

>Could some one help me with lwpr. I am running CAP6.0PL100 trying to

I don't know much about CAP6 but I know loads about PAP, I'll see if I
can make my way through these weeds...

>connect to a networked fake laserwriter. All my Macs have no problems

Errr, what do you mean "fake laserwriter" -- are you writing your own
PAP server?

>printing to this printer, it is just my Unix boxes running CAP. 
>
>The problem as I see it is that lwpr is unable to terminate the ATP
>session with the faked laserwriter. It just hangs forever until I do a
>^C. The following extract is example lwpr session with debugging info
>turned on for NBP/ATP/PAP. I appreciate any and all help.
>
>Anthony
>
>PS: The test postscript file prints sucessfully on a regular Sun
>serial printer.
>------extract (semi-long: aplogies)--------------------------------------------
> ...[ double click here to expand debug log ]...
>atp: [ATP_LISTENER: net=255.0, node=94, skt=135]
>atp: removing rspcb for trel on skt 133, TID 239
>atp: delete_rspcb: deleting 28e58
>pap: papwrite: cno 0, datasize 1953, eof yes
>pap: pwr entry with 1953 bytes
>pap: EOF SET

Ok - you've been sent an end of file with some data.

> ...[ double click here to expand debug log ]...
>atp: [ATP_LISTENER: net=255.0, node=94, skt=135]
>atp: Incoming request on socket 133 with TID 240
>atp: exactly once transaction: no rspcb
>atp: create_rspcb: create 28e58
>atp: XO: created rspcb 28e58 on socket 133, TID 240
>atp: delete_rqcb: deleting 267d0
>pap: Seq 6, expected 6
>pap: sending packet (pap 6, atp 240)

You've been sent a close connection. This is a bug anyway because
first off, there's something vital missing (which is not explained but
implied in the PAP spec.).

> ...[ double click here to expand debug log ]...
>atp: [ATP_LISTENER: net=255.0, node=94, skt=135]
>atp: Incoming request on socket 133 with TID 241
>atp: exactly once: rspcb 28e58
>atp: *incoming bitmap: ff*
>^Cpap: papclose: cno 0
>atp: create_tcb: creating 26d90

Well you've not really done anything with the close connection, so
everything is left dangling until you abort the whole thing with ^c.

> ...[ double click here to expand debug log ]...
>-------------------------------------end---------------------------------------
>
>--
>Anthony Mutiso (zanm03@cal.amoco.com)                Life-motto: Logic Rules.

It's not the PostScript that's at fault, it's two things: (1) a bad
implementation of lwpr and (2) your handling of the PAP protocol.

Happy hacking.

+--: Andy Edwards :----------*=================*------------------------------+
| Macintosh fire fighter,    | Harlequin Ltd.  |      uucp: bear@harlqn.uucp  |
| deity, PostScript language | Barrington Hall |     janet: bear@uk.co.harlqn |
| level 2 porter and PAP     | Barrington      | applelink: harlequin         |
| server clone originator.   | Cambridge       |     voice: 0223 872522       |
|   *Life is strange, yeah   | CB2 5RG         |            +44-223-872-522   |
|     compared to what?*     | England         |       fax: 0223 872519       |
+----------------------------*=================*------------------------------+
Newsgroups: comp.protocols.appletalk