#include <cogent.h>
int IP_NserveLookup(
char* name, IP_Task* task )
;
This function queries nserve for the first task corresponding to name. The task structure is filled in with all information from nserve. Strings are allocated as necessary, and will be deallocated when the task pointer is submitted to IP_TaskDestroy.
IP_NserveLookup assumes that the memory allocated for the task structure is uninitialized. After you have called IP_NserveLookup once on a given task structure, each subsequent time you call it on the same task structure, new buffers are allocated for names, but the old pointers are not freed. To eliminate this potential memory leak, you can use this sequence: task = IP_TaskNew(); IP_NserveLookup (name, task); IP_TaskDestroy (task); or this one: task = IP_NserveLookupName (name); if (task) IP_TaskDestroy (task); |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.