![]() |
|
|||
0001 /** 0002 * @brief Command line utility for transactino recovery 0003 * 0004 * @file tprecovercl.c 0005 */ 0006 /* ----------------------------------------------------------------------------- 0007 * Enduro/X Middleware Platform for Distributed Transaction Processing 0008 * Copyright (C) 2009-2016, ATR Baltic, Ltd. All Rights Reserved. 0009 * Copyright (C) 2017-2018, Mavimax, Ltd. All Rights Reserved. 0010 * This software is released under one of the following licenses: 0011 * AGPL or Mavimax's license for commercial use. 0012 * ----------------------------------------------------------------------------- 0013 * AGPL license: 0014 * 0015 * This program is free software; you can redistribute it and/or modify it under 0016 * the terms of the GNU Affero General Public License, version 3 as published 0017 * by the Free Software Foundation; 0018 * 0019 * This program is distributed in the hope that it will be useful, but WITHOUT ANY 0020 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 0021 * PARTICULAR PURPOSE. See the GNU Affero General Public License, version 3 0022 * for more details. 0023 * 0024 * You should have received a copy of the GNU Affero General Public License along 0025 * with this program; if not, write to the Free Software Foundation, Inc., 0026 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 0027 * 0028 * ----------------------------------------------------------------------------- 0029 * A commercial use license is available from Mavimax, Ltd 0030 * contact@mavimax.com 0031 * ----------------------------------------------------------------------------- 0032 */ 0033 0034 /*---------------------------Includes-----------------------------------*/ 0035 #include <stdio.h> 0036 #include <stdlib.h> 0037 #include <ndebug.h> 0038 #include <atmi.h> 0039 #include "tmrecover.h" 0040 /*---------------------------Externs------------------------------------*/ 0041 /*---------------------------Macros-------------------------------------*/ 0042 /*---------------------------Enums--------------------------------------*/ 0043 /*---------------------------Typedefs-----------------------------------*/ 0044 /*---------------------------Globals------------------------------------*/ 0045 /*---------------------------Statics------------------------------------*/ 0046 /*---------------------------Prototypes---------------------------------*/ 0047 0048 /** 0049 * Main entry for tmrecovercl 0050 */ 0051 int main( int argc, char** argv ) 0052 { 0053 int ret = EXSUCCEED; 0054 0055 0056 if (EXSUCCEED!=tpinit(NULL)) 0057 { 0058 NDRX_LOG(log_error, "Failed to init!"); 0059 EXFAIL_OUT(ret); 0060 } 0061 0062 ret = ndrx_tmrecover_do(); 0063 0064 fprintf(stderr, "Rolled back %d transaction branches\n", ret); 0065 0066 out: 0067 0068 tpterm(); 0069 0070 /* error or OK */ 0071 if (0 > ret) 0072 { 0073 return ret; 0074 } 0075 else 0076 { 0077 return EXSUCCEED; 0078 } 0079 0080 } 0081 0082 /* vim: set ts=4 sw=4 et smartindent: */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |