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
1d6e9ab9
Commit
1d6e9ab9
authored
Oct 20, 2014
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(UniXML): исправил ошибку в функции getPIntProp() для отрицательных чисел и нуля.
parent
5131dc5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
libuniset.spec
conf/libuniset.spec
+4
-1
UniXML.cc
src/Various/UniXML.cc
+5
-4
No files found.
conf/libuniset.spec
View file @
1d6e9ab9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
Name: libuniset
Name: libuniset
Version: 1.7
Version: 1.7
Release: alt1
5
Release: alt1
6
Summary: UniSet - library for building distributed industrial control systems
Summary: UniSet - library for building distributed industrial control systems
...
@@ -335,6 +335,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
...
@@ -335,6 +335,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%exclude %_pkgconfigdir/libUniSet.pc
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
%changelog
* Mon Oct 20 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt16
- fixed bug in UniXML::iteartor getPIntProp() for prop <= 0
* Sun Jun 22 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt15
* Sun Jun 22 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt15
- optimization: add insert-buffer for DBServer_MySQL (see uniset-docs)
- optimization: add insert-buffer for DBServer_MySQL (see uniset-docs)
...
...
src/Various/UniXML.cc
View file @
1d6e9ab9
...
@@ -133,7 +133,7 @@ int UniXML::getIntProp(const xmlNode* node, const string name )
...
@@ -133,7 +133,7 @@ int UniXML::getIntProp(const xmlNode* node, const string name )
int
UniXML
::
getPIntProp
(
const
xmlNode
*
node
,
const
string
name
,
int
def
)
int
UniXML
::
getPIntProp
(
const
xmlNode
*
node
,
const
string
name
,
int
def
)
{
{
string
param
=
getProp
(
node
,
name
);
string
param
(
getProp
(
node
,
name
)
);
if
(
param
.
empty
()
)
if
(
param
.
empty
()
)
return
def
;
return
def
;
...
@@ -407,10 +407,11 @@ int UniXML_iterator::getIntProp( const string name ) const
...
@@ -407,10 +407,11 @@ int UniXML_iterator::getIntProp( const string name ) const
int
UniXML_iterator
::
getPIntProp
(
const
string
name
,
int
def
)
const
int
UniXML_iterator
::
getPIntProp
(
const
string
name
,
int
def
)
const
{
{
int
i
=
getIntProp
(
name
);
string
param
(
getProp
(
name
)
);
if
(
i
<=
0
)
if
(
param
.
empty
()
)
return
def
;
return
def
;
return
i
;
return
UniSetTypes
::
uni_atoi
(
param
);
}
}
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
...
...
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