Renamed cleaner.c.src to tirpc_cleaner.c (to make it build).

For consistency added rpc_cleaner.c, which utilise only TS-RPC
functions.

Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmansk...@oracle.com>
---
 testcases/network/rpc/rpc-tirpc/.gitignore         |    2 +
 .../network/rpc/rpc-tirpc/tests_pack/cleaner.c.src |   48 --------------------
 .../network/rpc/rpc-tirpc/tests_pack/rpc_cleaner.c |   34 ++++++++++++++
 .../rpc/rpc-tirpc/tests_pack/tirpc_cleaner.c       |   48 ++++++++++++++++++++
 4 files changed, 84 insertions(+), 48 deletions(-)
 delete mode 100644 testcases/network/rpc/rpc-tirpc/tests_pack/cleaner.c.src
 create mode 100644 testcases/network/rpc/rpc-tirpc/tests_pack/rpc_cleaner.c
 create mode 100644 testcases/network/rpc/rpc-tirpc/tests_pack/tirpc_cleaner.c

diff --git a/testcases/network/rpc/rpc-tirpc/.gitignore 
b/testcases/network/rpc/rpc-tirpc/.gitignore
index 0db3f81..adcd811 100644
--- a/testcases/network/rpc/rpc-tirpc/.gitignore
+++ b/testcases/network/rpc/rpc-tirpc/.gitignore
@@ -1,3 +1,5 @@
+/tests_pack/rpc_cleaner
+/tests_pack/tirpc_cleaner
 /tests_pack/rpc_svc_1/rpc_svc_1
 /tests_pack/rpc_svc_2/rpc_svc_2
 /tests_pack/tirpc_svc_1/tirpc_svc_1
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/cleaner.c.src 
b/testcases/network/rpc/rpc-tirpc/tests_pack/cleaner.c.src
deleted file mode 100644
index a23d378..0000000
--- a/testcases/network/rpc/rpc-tirpc/tests_pack/cleaner.c.src
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) Bull S.A.  2007 All Rights Reserved.
-*
-* This program is free software; you can redistribute it and/or modify it
-* under the terms of version 2 of the GNU General Public License as
-* published by the Free Software Foundation.
-*
-* This program is distributed in the hope that it would be useful, but
-* WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-*
-* Further, this software is distributed without any warranty that it is
-* free of the rightful claim of any third person regarding infringement
-* or the like.  Any license provided herein, whether implied or
-* otherwise, applies only to this software file.  Patent licenses, if
-* any, provided herein do not apply to combinations of this program with
-* other software, or any other product whatsoever.
-*
-* You should have received a copy of the GNU General Public License along
-* with this program; if not, write the Free Software Foundation, Inc.,
-* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*
-* History:
-* Created by: Cyril Lacabanne (cyril.lacaba...@bull.net)
-*
-*/
-
-#include <stdio.h>
-#include <tirpc/netconfig.h>
-#include <sys/socket.h>
-#include <tirpc/rpc/rpc.h>
-#include <tirpc/rpc/types.h>
-#include <tirpc/rpc/xdr.h>
-#include <tirpc/rpc/svc.h>
-#include <errno.h>
-
-//Standard define
-#define VERSNUM 1
-
-int main(int argn, char *argc[])
-{
-       //Server parameter is : argc[1] : Server Program Number
-       int progNum = atoi((char *)argc[1]);
-
-       svc_unreg(progNum, VERSNUM);
-
-       return 0;
-}
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_cleaner.c 
b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_cleaner.c
new file mode 100644
index 0000000..e17430f
--- /dev/null
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_cleaner.c
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2014 Oracle and/or its affiliates. All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#include <stdio.h>
+#include <rpc/rpc.h>
+
+#define VERSNUM 1 /* Default version used in the test binaries */
+
+int main(int argc, char *argv[])
+{
+       /* Server program number */
+       int prog_num = atoi(argv[1]);
+
+       pmap_unset(prog_num, VERSNUM);
+       svc_unregister(prog_num, VERSNUM);
+
+       return 0;
+}
diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/tirpc_cleaner.c 
b/testcases/network/rpc/rpc-tirpc/tests_pack/tirpc_cleaner.c
new file mode 100644
index 0000000..a23d378
--- /dev/null
+++ b/testcases/network/rpc/rpc-tirpc/tests_pack/tirpc_cleaner.c
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) Bull S.A.  2007 All Rights Reserved.
+*
+* This program is free software; you can redistribute it and/or modify it
+* under the terms of version 2 of the GNU General Public License as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it would be useful, but
+* WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*
+* Further, this software is distributed without any warranty that it is
+* free of the rightful claim of any third person regarding infringement
+* or the like.  Any license provided herein, whether implied or
+* otherwise, applies only to this software file.  Patent licenses, if
+* any, provided herein do not apply to combinations of this program with
+* other software, or any other product whatsoever.
+*
+* You should have received a copy of the GNU General Public License along
+* with this program; if not, write the Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*
+* History:
+* Created by: Cyril Lacabanne (cyril.lacaba...@bull.net)
+*
+*/
+
+#include <stdio.h>
+#include <tirpc/netconfig.h>
+#include <sys/socket.h>
+#include <tirpc/rpc/rpc.h>
+#include <tirpc/rpc/types.h>
+#include <tirpc/rpc/xdr.h>
+#include <tirpc/rpc/svc.h>
+#include <errno.h>
+
+//Standard define
+#define VERSNUM 1
+
+int main(int argn, char *argc[])
+{
+       //Server parameter is : argc[1] : Server Program Number
+       int progNum = atoi((char *)argc[1]);
+
+       svc_unreg(progNum, VERSNUM);
+
+       return 0;
+}
-- 
1.7.1


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to