libdsdb3  3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups
Facility Locations

Data Structures

struct  FacLoc
 Facility Location. More...

Functions

void dsdb_free_facility_location (FacLoc *fac_loc)
 Free all memory used by a FacLoc structure.
int dsdb_get_facility_location (DSDB *dsdb, const char *site, const char *facility, FacLoc **fac_loc)
 Get a facility location from the database.

Detailed Description


Function Documentation

void dsdb_free_facility_location ( FacLoc fac_loc)

Free all memory used by a FacLoc structure.

Parameters:
fac_loc- pointer to the FacLoc structure

Definition at line 84 of file facility_location.c.

int dsdb_get_facility_location ( DSDB dsdb,
const char *  site,
const char *  facility,
FacLoc **  fac_loc 
)

Get a facility location from the database.

The memory used by the output structure is dynamically allocated. It is the responsibility of the calling process to free this memory when it is no longer needed (see dsdb_free_facility_location()).

Error messages from this function are sent to the message handler (see msngr_init_log() and msngr_init_mail()).

Null results from the database are not reported as errors. It is the responsibility of the calling process to report these as errors if necessary.

Parameters:
dsdb- pointer to the open database connection
site- site name
facility- facility name
fac_loc- output: pointer to the FacLoc structure
Returns:
  • 1 if successful
  • 0 if the database returned a NULL result
  • -1 if an error occurred
See also:
dsdb_free_facility_location()

Definition at line 118 of file facility_location.c.