/*
 * AUTH_STATUS.pgc - au 모듈 서비스 AUTH_STATUS (one service = one file).
 * 승인 상태 조회 (dbio).
 * Moved verbatim from the former inline au_svr.pgc; runs on the caller's XA
 * branch (no EXEC SQL CONNECT). Advertised by au_svr at tpsvrinit.
 */
#include "AUTH_STATUS.h"

void AUTH_STATUS(TPSVCINFO *p)
{
    UBFH *b = (UBFH *)p->data;
    long auth_id = getl(b, T_ID1);
    char st[4];
    if (audb_get_auth_status(auth_id, st) < 0) FAIL(b);
    Bchg(b, T_STATUS, 0, st, 0L);
    OK(b);
}
