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
180c78b0
Commit
180c78b0
authored
Sep 14, 2009
by
Pavel Vaynerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug in admin --saveValue
parent
9dff12fc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
admin.cc
Utilities/Admin/admin.cc
+17
-21
libuniset.spec
conf/libuniset.spec
+4
-1
No files found.
Utilities/Admin/admin.cc
View file @
180c78b0
...
...
@@ -824,10 +824,10 @@ int saveValue(string args, UniversalInterface &ui)
{
if
(
isdigit
(
arg
[
0
]
)
)
{
if
(
sscanf
(
arg
.
c_str
(),
"%ld
:%ld=%ld"
,
&
sid
,
&
node
,
&
val
)
<
2
)
if
(
sscanf
(
arg
.
c_str
(),
"%ld
=%ld"
,
&
sid
,
&
val
)
<
2
)
{
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cerr
<<
"
!!!!!!
!!! SensorId=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
cerr
<<
"
(digit):
!!! SensorId=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
err
=
1
;
continue
;
}
...
...
@@ -835,16 +835,16 @@ int saveValue(string args, UniversalInterface &ui)
else
{
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
val
)
<
1
)
)
{
cout
<<
i
<<
"
\t
------------------------"
<<
endl
;
cerr
<<
"
!!!!!!
!!! SensorName=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
cerr
<<
"
(name):
!!! SensorName=Value #"
<<
i
<<
" '"
<<
arg
<<
"' !!!!!!
\n
"
<<
endl
;
err
=
1
;
continue
;
}
...
...
@@ -896,11 +896,11 @@ int saveState(string args, UniversalInterface &ui)
else
{
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
inval
)
<
1
)
)
{
...
...
@@ -965,11 +965,11 @@ int setValue(string args, UniversalInterface &ui)
else
{
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
val
)
<
1
)
)
{
...
...
@@ -1025,11 +1025,11 @@ int setState(string args, UniversalInterface &ui)
else
{
int
ind
;
string
name
,
strval
;
string
strval
;
ind
=
arg
.
find_first_of
(
"="
);
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
.
substr
(
0
,
ind
);
string
name
(
arg
.
substr
(
0
,
ind
)
);
strval
=
arg
.
substr
(
ind
+
1
,
arg
.
length
()
);
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
name
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
||
(
sscanf
(
strval
.
c_str
(),
"%ld"
,
&
inval
)
<
1
)
)
{
...
...
@@ -1097,9 +1097,7 @@ int getState(string args, UniversalInterface &ui)
}
else
{
string
name
;
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
;
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
arg
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
)
{
...
...
@@ -1161,9 +1159,7 @@ int getValue(string args, UniversalInterface &ui )
}
else
{
string
name
;
name
=
conf
->
getSensorsSection
()
+
"/"
+
arg
;
sid
=
conf
->
oind
->
getIdByName
(
name
);
sid
=
conf
->
getSensorID
(
arg
);
if
(
sid
==
UniSetTypes
::
DefaultObjectId
)
{
...
...
conf/libuniset.spec
View file @
180c78b0
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.96
Release: eter6
0
Release: eter6
1
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
...
...
@@ -179,6 +179,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Thu Sep 10 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter60
- rebuild for eterbook
* Thu Sep 10 2009 Pavel Vainerman <pv@altlinux.ru> 0.96-eter59
- UniNetwork debugging
...
...
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