Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
9865949d
Commit
9865949d
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #8968: config: removed unused method saveConfigTree
parent
8cffa8e8
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
daemon/src/config/config.cpp
+0
-37
0 additions, 37 deletions
daemon/src/config/config.cpp
daemon/src/config/config.h
+0
-5
0 additions, 5 deletions
daemon/src/config/config.h
with
0 additions
and
42 deletions
daemon/src/config/config.cpp
+
0
−
37
View file @
9865949d
...
...
@@ -223,43 +223,6 @@ void ConfigTree::setConfigTreeItem(const std::string& section,
return
;
}
// Save config to a file (ini format)
// return false if empty, no config, or enable to open
// return true if everything is ok
bool
ConfigTree
::
saveConfigTree
(
const
std
::
string
&
fileName
)
const
{
DEBUG
(
"ConfigTree: Save %s"
,
fileName
.
c_str
());
if
(
fileName
.
empty
()
and
sections_
.
begin
()
==
sections_
.
end
())
return
false
;
std
::
fstream
file
;
file
.
open
(
fileName
.
data
(),
std
::
fstream
::
out
);
if
(
!
file
.
is_open
())
{
ERROR
(
"ConfigTree: Error: Could not open %s configuration file"
,
fileName
.
c_str
());
return
false
;
}
// for each section, for each item...
for
(
SectionMap
::
const_iterator
iter
=
sections_
.
begin
();
iter
!=
sections_
.
end
();
++
iter
)
{
file
<<
"["
<<
iter
->
first
<<
"]"
<<
std
::
endl
;
for
(
ItemMap
::
const_iterator
iterItem
=
iter
->
second
.
begin
();
iterItem
!=
iter
->
second
.
end
();
++
iterItem
)
file
<<
iterItem
->
first
<<
"="
<<
iterItem
->
second
.
getValue
()
<<
std
::
endl
;
file
<<
std
::
endl
;
}
file
.
close
();
if
(
chmod
(
fileName
.
c_str
(),
S_IRUSR
|
S_IWUSR
))
ERROR
(
"ConfigTree: Error: Failed to set permission on configuration: %m"
);
return
true
;
}
// Create the tree from an existing ini file
// false = error
// true = OK
...
...
This diff is collapsed.
Click to expand it.
daemon/src/config/config.h
+
0
−
5
View file @
9865949d
...
...
@@ -132,11 +132,6 @@ class ConfigTree {
int
getConfigTreeItemIntValue
(
const
std
::
string
&
section
,
const
std
::
string
&
itemName
)
const
;
bool
getConfigTreeItemBoolValue
(
const
std
::
string
&
section
,
const
std
::
string
&
itemName
)
const
;
/**
* Flush data to .ini file
*/
bool
saveConfigTree
(
const
std
::
string
&
fileName
)
const
;
/**
* Load data (and fill ConfigTree) from disk
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment