snmdb_lock manual page
Table of Contents

NAME

snmdb_lock - locks the database

SYNOPSIS

#include <netmgt/netmgt_db.h>

snmdb_lock(wait, clock)
int wait;
int clock;

DESCRIPTION

snmdb_lock locks the database so that entries can be changed. snmdb_lock returns a Boolean indicating whether the database could be locked. After the database updates are complete, unlock the database by using snmdb_unlock(3n).

INPUT ARGUMENTS

wait Boolean indicating whether the process should wait if the database is locked by another process. If this argument is not set and the database is already locked, snmdb_lock returns 0, and snm_error(3n) indicates the reason for the error.

clock
Boolean specifying whether the Console should display a clock to indicate that the database is locked.

RETURN VALUE

Returns 1 if database has been locked. Otherwise, it returns a 0. If the database has not been locked, the external variable snm_error(3n) is set to the error reason.

NOTE

Set the first argument to TRUE to cause the SNM Console to update its display if an element is added, modified, or deleted from the Console's current view. Otherwise, the Console user must leave the view and then return to the view in order to see the change.

SEE ALSO

snmdb_unlock(3n)


Table of Contents