Service Lookup
Service Lookup
- Subject: Service Lookup
- From: Mandip Chadha <email@hidden>
- Date: Thu, 21 Mar 2002 23:37:02 +0900
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.