Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!cs.glasgow.ac.UK!inei From: inei@cs.glasgow.ac.UK (Nick Nei) Newsgroups: comp.protocols.appletalk Subject: Re: Can lwsrv talk back to a mac? Message-ID: <6410.8905260033@crete.cs.glasgow.ac.uk> Date: 26 May 89 00:33:11 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 36 Ken Spagnolo writes: >We are using lwsrv and papif to send print jobs thru a Pyramid to our >laser printer. We would like to limit who can use this printer and toss >unauthorized jobs. >However, we would like to let the user know that nothing is going to come >the other end, and here we have encountered difficulty. I have implemented a user-name and password scheme which modifies lwsrv to check user-name and password. To return a status message to the Macintosh (eg, "Wrong password"), lwsrv must be running single-fork. There is a bug in lwsrv.c. The status and user-name strings are not null'd/cleared after each time round the big loop. Null it yourself otherwise the next lwsrv job gets the status message of the previous one! In fact passing diagnostics back to the Macintosh is not a good idea, as I soon discovered. This is because with small print jobs, the user does not see the message at all: lwsrv receives the whole file, disconnects from the Macintosh, discovers password/user-name is wrong, writes to status, but the Mac is no longer listening. Another disadvantage (even if you manage to get the message back to the Mac), the message may not stay on screen long enough. Your user may miss it and end up scratching his/her head. In the end I decided that the best solution is to print a page on the LaserWriter with the diagnostic message (with the name of the document). This seemed the best idea because the user is likely to be hovering over the LaserWriter and not the Macintosh. Mail: Nick Nei, Computing Science Dept., Glasgow Univ., 17 Lilybank Gardens, Glasgow G12 8QQ, UK. Tel: (041) 339 8855 x 5457 ARPA: inei%cs.glasgow.ac.uk@nsfnet-relay.ac.uk USENET: inei@cs.glasgow.uucp