Distributed Name Service (DNS) Management Programming Manual

DNS Programming Example, C
46958 Tandem Computers Incorporated H–19
if (status = SSGETTKN((short *) &resp_buf
, ZSPI_TKN_RETCODE
, (char *) &retcode))
{
ABORTTRANSACTION();
return dns_return(spi_err, status);
}
if (retcode)
{
/*-------------------------------------------------------------*/
/* Name manager detected error; abort transaction and return */
/*-------------------------------------------------------------*/
ABORTTRANSACTION();
return dns_return(dns_err, retcode);
}
/*-----------------------------------------------*/
/* No error; try to commit the TMF transaction */
/*-----------------------------------------------*/
if (status = ENDTRANSACTION())
return dns_return(tmf_err, status);
/*------------------------------*/
/* Return indication of success */
/*------------------------------*/
return dns_return(no_err, 0);
}
#pragma page "DNS_ALTER_ALIAS"
/*==================================================================*/
/* Change the definition of an alias */
/*==================================================================*/
error_return_def dns_alter_alias(int file_desc /* File number */
, char *alias /* Alias to be */
, char *defnode /* changed */
, char *domain /* New domain */
, int reftype /* Type of new REF*/
, char *ssobject /* New */
, char *ssmanager) /* Referent */
{
int status;
int retcode;
zdns_ddl_msg_buffer_def req_buf;
zdns_ddl_msg_buffer_def resp_buf;
error_return_def result;
zdns_ddl_alter_alias_def param;
/*--------------------------------*/
/* Initialize ALTER ALIAS request */
/*--------------------------------*/