Ejemplo n.º 1
0
/*{
** Name:	unquiet_db - unquiet a database
**
** Description:
**	Updates the database to mark the specified database number
**	as unquiet.
**
** Inputs:
**	db_no		- database number to be unquieted
**	quiet_type	- used to specify a USER_QUIET or SERVER_QUIET state
**
** Outputs:
**	none
**
** Returns:
**	none
*/
void
unquiet_db(
i2	db_no,
i4	quiet_type)
{
	char	stmt[512];

	/* Unquieting target database %d */
	messageit(2, 1722, db_no);

	STprintf(stmt,
		ERx("UPDATE dd_db_cdds SET is_quiet = %d WHERE server_no = %d \
AND database_no = %d AND is_quiet != %d AND is_quiet <= %d"),
		NOT_QUIET, (i4)RSserver_no, (i4)db_no, NOT_QUIET, quiet_type);
	if (quiet_update(stmt) != IIAPI_ST_SUCCESS)
		RSshutdown(FAIL);
}
Ejemplo n.º 2
0
/*{
** Name:	quiet_db - quiet a database
**
** Description:
**	Updates the database to mark the specified database number
**	as quiet.
**
** Inputs:
**	db_no		- database number to be quieted
**	quiet_type	- used to specify a USER_QUIET or SERVER_QUIET state
**
** Outputs:
**	none
**
** Returns:
**	none
*/
void
quiet_db(
i2	db_no,
i4	quiet_type)
{
	char	stmt[512];

	/* Setting target database %d to quiet */
	messageit(2, 1718, db_no);
	STprintf(stmt,
		ERx("UPDATE dd_db_cdds SET is_quiet = %d WHERE server_no = %d \
AND database_no = %d AND is_quiet < %d"),
		quiet_type, (i4)RSserver_no, (i4)db_no, quiet_type);

	if (quiet_update(stmt) != IIAPI_ST_SUCCESS)
		RSshutdown(FAIL);
}
Ejemplo n.º 3
0
/*{
** Name:	new_node - new node
**
** Description:
**	Create a new structure and append it to the bottom of the linklist.
**
** Inputs:
**	none
**
** Outputs:
**	none
**
** Returns:
**	A pointer to the new node.
**
** Side effects:
**	Some of the static pointers above are changed.
*/
RLIST *
new_node()
{
	RLIST	*mark;

	/* top %d, atop %d */
	messageit(5, 1264, top, atop);

	if (atop)
	{
		mark = atop;
		atop = atop->link;
	}
	else
	{
		mark = (RLIST *)MEreqmem(0, sizeof(RLIST), TRUE,
			(STATUS *)NULL);
		if (mark == NULL)
		{
			/* Error Allocating Memory for Record List: Aborting */
			messageit(1, 1266);
			RSshutdown(FAIL);
		}
	}

	mark->link = (RLIST *)NULL;
	mark->blink = (RLIST *)NULL;

	if (bottom)	/* there is already a linklist */
	{
		bottom->link = mark;
		mark->blink = bottom;
		bottom = mark;
	}
	else		/* first structure in the linklist */
	{
		top = mark;
		bottom = mark;
	}

	/* top %d, atop %d, mark %d */
	messageit(5, 1265, top, atop, mark);
	return (mark);
}