summaryrefslogtreecommitdiff
path: root/utils/nslist/nsadd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nslist/nsadd.cpp')
-rw-r--r--utils/nslist/nsadd.cpp46
1 files changed, 17 insertions, 29 deletions
diff --git a/utils/nslist/nsadd.cpp b/utils/nslist/nsadd.cpp
index 265aff18561..beaab182720 100644
--- a/utils/nslist/nsadd.cpp
+++ b/utils/nslist/nsadd.cpp
@@ -1,34 +1,28 @@
-// $Id$
-// ================================================================
-//
-// = LIBRARY
-// utils
-//
-// = FILENAME
-// nsadd.cpp
-//
-// = DESCRIPTION
-// Naming Service add utility
-//
-// = AUTHOR
-// Carlos O'Ryan
-// enhanced Nov 6, 2002 Paul Caffrey <denginere@hotmail.com>
-// redone Jun 21 2006 Simon Massey <sma@prismtech.com>
-//
-// ================================================================
+//=============================================================================
+/**
+ * @file nsadd.cpp
+ *
+ * $Id$
+ *
+ * Naming Service add utility
+ *
+ *
+ * @author Carlos O'Ryan enhanced Nov 6
+ * @author 2002 Paul Caffrey <denginere@hotmail.com> redone Jun 21 2006 Simon Massey <sma@prismtech.com>
+ */
+//=============================================================================
+
#include "orbsvcs/CosNamingC.h"
#include "ace/Log_Msg.h"
#include "ace/OS_NS_string.h"
-#include "ace/Argv_Type_Converter.h"
-CORBA::ORB_var orb;
int showIOR = 0;
int showNSonly = 0;
int
-ACE_TMAIN (int argcw, ACE_TCHAR *argvw[])
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
{
CosNaming::Name the_name (0);
CORBA::ORB_var orb;
@@ -37,9 +31,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[])
try
{
// Contact the orb
- ACE_Argv_Type_Converter argcon (argcw, argvw);
- orb = CORBA::ORB_init (argcon.get_argc (), argcon.get_ASCII_argv (),
- "");
+ orb = CORBA::ORB_init (argc, argv);
// Scan through the command line options
bool
@@ -47,10 +39,6 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[])
quiet = false,
rebind = false,
context = false;
- int
- argc = argcon.get_argc ();
- ACE_TCHAR
- **argv = argcon.get_TCHAR_argv ();
const ACE_TCHAR
*const pname = argv[0];
const ACE_TCHAR *nameService = 0;
@@ -378,6 +366,7 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[])
root_nc->bind (the_name, obj.in ());
}
}
+ orb->destroy ();
}
catch (const CosNaming::NamingContext::NotFound& nf)
{
@@ -428,7 +417,6 @@ ACE_TMAIN (int argcw, ACE_TCHAR *argvw[])
return 1;
}
- orb->destroy ();
return 0;
}