Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
7c4f0c19
Commit
7c4f0c19
authored
Aug 04, 2009
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix const char ** situation
parent
e751a8d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
Configuration.cc
src/Various/Configuration.cc
+15
-14
No files found.
src/Various/Configuration.cc
View file @
7c4f0c19
...
...
@@ -123,7 +123,7 @@ Configuration::~Configuration()
}
// ---------------------------------------------------------------------------------
Configuration
::
Configuration
(
int
argc
,
const
char
**
argv
,
const
string
xmlfile
)
:
Configuration
::
Configuration
(
int
argc
,
const
char
*
const
*
argv
,
const
string
xmlfile
)
:
mi
(
NULL
),
oind
(
NULL
),
_argc
(
argc
),
...
...
@@ -141,7 +141,7 @@ Configuration::Configuration( int argc, const char** argv, const string xmlfile
initConfiguration
(
argc
,
argv
);
}
// ---------------------------------------------------------------------------------
Configuration
::
Configuration
(
int
argc
,
const
char
**
argv
,
ObjectIndex
*
_oind
,
Configuration
::
Configuration
(
int
argc
,
const
char
*
const
*
argv
,
ObjectIndex
*
_oind
,
const
string
fileConf
)
:
mi
(
NULL
),
oind
(
NULL
),
...
...
@@ -161,7 +161,7 @@ Configuration::Configuration( int argc, const char** argv, ObjectIndex* _oind,
initConfiguration
(
argc
,
argv
);
}
// ---------------------------------------------------------------------------------
Configuration
::
Configuration
(
int
argc
,
const
char
**
argv
,
const
string
fileConf
,
Configuration
::
Configuration
(
int
argc
,
const
char
*
const
*
argv
,
const
string
fileConf
,
UniSetTypes
::
ObjectInfo
*
omap
)
:
mi
(
NULL
),
oind
(
NULL
),
...
...
@@ -181,7 +181,7 @@ Configuration::Configuration( int argc, const char** argv, const string fileConf
initConfiguration
(
argc
,
argv
);
}
// ---------------------------------------------------------------------------------
void
Configuration
::
initConfiguration
(
int
argc
,
const
char
**
argv
)
void
Configuration
::
initConfiguration
(
int
argc
,
const
char
*
const
*
argv
)
{
// PassiveTimer pt(UniSetTimer::WaitUpTime);
if
(
unideb
.
debugging
(
Debug
::
SYSTEM
)
)
...
...
@@ -305,22 +305,22 @@ void Configuration::initConfiguration( int argc, const char** argv )
// +N --> -ORBIniRef NodeName=
// +2 --> -ORBIniRef NameService=
_argc
=
argc
+
2
*
lnodes
.
size
()
+
2
;
_argv
=
new
const
char
*
[
_argc
];
const
char
**
new
_argv
=
new
const
char
*
[
_argc
];
int
i
=
0
;
//
for
(
;
i
<
argc
;
i
++
)
_argv
[
i
]
=
strdup
(
argv
[
i
]);
new
_argv
[
i
]
=
strdup
(
argv
[
i
]);
// , i
for
(
UniSetTypes
::
ListOfNode
::
iterator
it
=
lnodes
.
begin
();
it
!=
lnodes
.
end
();
++
it
)
{
_argv
[
i
]
=
"-ORBInitRef"
;
new
_argv
[
i
]
=
"-ORBInitRef"
;
string
name
(
oind
->
getRealNodeName
(
it
->
id
));
ostringstream
param
;
param
<<
name
<<
"=corbaname::"
<<
it
->
host
<<
":"
<<
it
->
port
;
_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
new
_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
if
(
unideb
.
debugging
(
Debug
::
INFO
)
)
unideb
[
Debug
::
INFO
]
<<
"(Configuration): "
<<
param
.
str
()
<<
endl
;
...
...
@@ -333,14 +333,14 @@ void Configuration::initConfiguration( int argc, const char** argv )
if
(
!
nsnode
)
{
unideb
[
Debug
::
WARN
]
<<
"(Configuration): 'NameService'
\n
"
;
_argv
[
i
]
=
""
;
_argv
[
i
+
1
]
=
""
;
new
_argv
[
i
]
=
""
;
new
_argv
[
i
+
1
]
=
""
;
}
else
{
_argv
[
i
]
=
"-ORBInitRef"
;
new
_argv
[
i
]
=
"-ORBInitRef"
;
_argv
[
i
+
1
]
=
""
;
// (.. getArgParam)
new
_argv
[
i
+
1
]
=
""
;
// (.. getArgParam)
string
defPort
(
getPort
()
);
// getArgParam! _argv
if
(
defPort
==
UniSetDefaultPort
)
...
...
@@ -351,11 +351,12 @@ void Configuration::initConfiguration( int argc, const char** argv )
ostringstream
param
;
param
<<
"NameService=corbaname::"
<<
getProp
(
nsnode
,
"host"
)
<<
":"
<<
defPort
;
_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
new
_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
if
(
unideb
.
debugging
(
Debug
::
INFO
)
)
unideb
[
Debug
::
INFO
]
<<
"(Configuration): "
<<
param
.
str
()
<<
endl
;
}
_argv
=
new_argv
;
// ------------- CORBA INIT -------------
// orb init
orb
=
CORBA
::
ORB_init
(
_argc
,(
char
**
)
_argv
);
...
...
@@ -959,7 +960,7 @@ xmlNode* Configuration::getXMLServicesSection()
return
xmlServicesSec
;
}
// -------------------------------------------------------------------------
void
uniset_init
(
int
argc
,
const
char
**
argv
,
const
std
::
string
xmlfile
)
void
uniset_init
(
int
argc
,
const
char
*
const
*
argv
,
const
std
::
string
xmlfile
)
{
string
confile
=
UniSetTypes
::
getArgParam
(
"--confile"
,
argc
,
argv
,
xmlfile
);
UniSetTypes
::
conf
=
new
Configuration
(
argc
,
argv
,
confile
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment