[comp.sys.mac.programmer] MPW Interface bug

butenko@bob.srcc.msu.su (Vladimir A. Butenko) (02/13/91)

In <1991Feb12.130352.25787@nada.kth.se> Erland Lewin wrote:

>  We are having a very strange problem with AppleTalk in ThinkC v4.02.
>
>  We have written a client and a server program. The server uses atpOpenSocket
> and NBPRegister, then the Client finds him via NBPLookup. So far everything 
> works perfectly.
>
>  But then the Server does an atpGetRequest, and the Client an
> atpRequest. This does not work. When the same calls with the same
> parameters are made in MPW Pascal, everything works perfectly.
>
>  Has anyone else solved similar problems, or perhaps have some Think
> C source code demonstrating the use of atpRequest and atpGetRequest?

It seems to me that the problem is in atpOpenSocket call on the server side.
I use Think C 4.0 which has no prototypes for appletalk calls, and I think
that either you or Symantec in TC 4.2 had a look on MPW AppleTalk prototypes.

But - THERE IS AN ERROR IN MPW PROTOTYPES:

MPW prototype:
  pascal OSErr ATPOpenSocket(const AddrBlock* addrRcvd, short* atpSocket);

Right prototype:
  pascal OSErr ATPOpenSocket(AddrBlock addrRcvd, short* atpSocket);
                             ^^^^^^^^^^^^^^^^^^

I've found it a year ago, but I've told Apple about it only a month ago, and
they said that this bug would be fixed in the next release of MPW.

>    Thanx for your help!

I hope this helps.

BTW, guys, should I send my "Bug Reports" not only to Apple, but to Usenet
or Sumex also (after confirmation by Apple)?

The last bugs I found were in:
   List Manager
   Notification Manager

-- 
Vladimir A. Butenko             Internet:       <Butenko@bob.srcc.msu.su>
Gamma Software,                 Phone:          7(095)939-2618
Moscow State University         Fax:            7(095)938-2136
* ===  To Gorby-lovers: communists can't reform, but they can pretend! === *