/*
 * MG_CONFIRM.pgc - mg 모듈 서비스 MG_CONFIRM (one service = one file).
 * Split out of the former inline mg_svr.pgc; runs on the caller's XA
 * branch (no EXEC SQL CONNECT). Advertised by mg_svr at tpsvrinit.
 */
#include "MG_CONFIRM.h"

/* 30. MG_CONFIRM - 전문 확정 (status=C). */
void MG_CONFIRM(TPSVCINFO *p)
{
    UBFH *b = (UBFH *)p->data;
    long msg_id = getl(b, T_ID1);
    if (mgdb_update_msg_rc(msg_id, "00", "C") < 0) FAIL(b);
    sets_(b, T_STATUS, "C");
    OK(b);
}
