Re: Service Lookup
Re: Service Lookup
- Subject: Re: Service Lookup
- From: Marc Krochmal <email@hidden>
- Date: Fri, 22 Mar 2002 15:50:00 -0800
Mandip,
The problem is with the NSLPrepareRequest() call. Make sure
'entitiyobject' is not NULL by passing in a bogus number of some kind.
I'll file a bug about that.
-Marc
On Friday, March 22, 2002, at 03:30 AM, macnetworkprog-
email@hidden wrote:
Hi
I am trying add a NetWork Check for OSX App using NSL.
I have the following piece of code. this is only the NSL area of the
code.
I cannot figure out why, CientNotifier code is not getting called. Can
someone explain, what I am doing wrong over here?
long my_network_check(){
.....
.....
....
sBufPtr = (char *)afs_api_NewPtrClear( 1024 );
gNSLClientNotifyUPP = NewNSLClientNotifyUPP(NSLClientNotifier);
//
// using NSL, register the name across the network........
//
err = NSLOpenNavigationAPI(&gClientRef);
neighborhood = NSLMakeNewNeighborhood(NULL, NULL);
error =
NSLStandardRegisterURL("http://recosoft/23145678",neighborhood);
err |= error.theErr;
if (err == knoerr){
service_list = NSLMakeNewServicesList( "http" );
err = NSLMakeServicesRequestPB(service_list, &RequestData);
error = NSLPrepareRequest(gNSLClientNotifyUPP, (void
*)entityobject,
gClientRef, &RequestInfo, sBufPtr, 1024, &infoPtr);
err |= error.theErr;
if (err == knoerr){
infoPtr->alertThreshold = 1;
infoPtr->maxSearchTime = 0;
infoPtr->alertInterval = 0;
infoPtr->clientContextPtr = NULL;
// Starts looking for entities if the specified
type
in the specified neighborhood.
error = NSLStartServicesLookup(RequestInfo, neighborhood,
RequestData, infoPtr);
}
}
return knoerr;
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.