HP3000-L Archives

January 1996, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bruce Toback <[log in to unmask]>
Reply To:
Bruce Toback <[log in to unmask]>
Date:
Sun, 21 Jan 1996 17:14:05 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (38 lines)
At  8:28 AM 1/19/96 -0700, Open Skies wrote:
>Phil Smith wrote:
>>
>> In article <[log in to unmask]>, [log in to unmask] (Open Skies)
>wrote:
>>
>> >  ipcgive(ClientSock,GiveName,0,0,&HPStatus);
>>                                  ^
>> The flags parameter needs to be passed by reference; you're giving a NULL
>> address.
>
>No can do.  I still get the bounds violation.
>
>Here is the new snippet of code
[snipette]
> printf("Giving away socket %d...\n",ClientSock);
> ipcgive(ClientSock,GiveName,GiveLen,&Flags,&IPCStatus);
 
 
Make sure you're declaring IPCGIVE as an intrinsic. Because it's option
variable, it has an extra hidden parameter that gives the number of
parameters passed. Incidentally, if you haven't discovered this already,
failing to declare an intrinsic with #pragma intrinsic can be the source of
some insidious bugs. Sometimes, especially for procedures with only a few
parameters, everything will look like it works correctly, but one day the
registers will be a little bit different by accident, and...
 
I've called IPCGIVE from C with no problems.
 
-- Bruce
 
---------------------------------------------------------------------------
Bruce Toback    Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc.            (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142      | But ah, my foes, and oh, my friends -
Phoenix AZ 85028                   | It gives a lovely light.
[log in to unmask]                 |     -- Edna St. Vincent Millay

ATOM RSS1 RSS2