Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
92b36583
Commit
92b36583
authored
Dec 01, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sevcli, uknown message at reconnect wasn't freed. sevTimeout added
parent
7d893541
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
src/lib/rt/src/rt_sevcli.c
src/lib/rt/src/rt_sevcli.c
+22
-2
No files found.
src/lib/rt/src/rt_sevcli.c
View file @
92b36583
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include "pwr.h"
#include "pwr.h"
#include "co_cdh.h"
#include "co_cdh.h"
#include "co_time.h"
#include "co_time.h"
#include "co_cnf.h"
#include "rt_qcom.h"
#include "rt_qcom.h"
#include "rt_qcom_msg.h"
#include "rt_qcom_msg.h"
#include "rt_sev_msg.h"
#include "rt_sev_msg.h"
...
@@ -339,9 +340,25 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
...
@@ -339,9 +340,25 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
sev_sMsgHistDataGetRequest
*
msg
;
sev_sMsgHistDataGetRequest
*
msg
;
qcom_sQid
tgt
;
qcom_sQid
tgt
;
qcom_sPut
put
;
qcom_sPut
put
;
int
tmo
=
3000
0
;
static
int
tmo
=
0
;
qcom_sGet
get
;
qcom_sGet
get
;
pwr_tStatus
lsts
;
pwr_tStatus
lsts
;
if
(
tmo
==
0
)
{
int
value
;
char
value_str
[
20
];
int
nr
;
if
(
cnf_get_value
(
"sevTimeout"
,
value_str
,
sizeof
(
value_str
)))
{
nr
=
sscanf
(
value_str
,
"%d"
,
&
value
);
if
(
nr
!=
1
)
tmo
=
30000
;
else
tmo
=
1000
*
value
;
}
else
tmo
=
30000
;
}
if
(
ctx
->
server
)
if
(
ctx
->
server
)
tgt
.
nid
=
ctx
->
server
;
tgt
.
nid
=
ctx
->
server
;
...
@@ -373,8 +390,10 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
...
@@ -373,8 +390,10 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
memset
(
&
get
,
0
,
sizeof
(
get
));
memset
(
&
get
,
0
,
sizeof
(
get
));
for
(;;)
{
for
(;;)
{
rmsg
=
(
sev_sMsgHistDataGet
*
)
qcom_Get
(
sts
,
&
ctx
->
qid
,
&
get
,
0
);
rmsg
=
(
sev_sMsgHistDataGet
*
)
qcom_Get
(
sts
,
&
ctx
->
qid
,
&
get
,
0
);
if
(
!
rmsg
)
if
(
!
rmsg
)
break
;
break
;
qcom_Free
(
sts
,
rmsg
);
}
}
if
(
!
qcom_Put
(
sts
,
&
tgt
,
&
put
))
{
if
(
!
qcom_Put
(
sts
,
&
tgt
,
&
put
))
{
...
@@ -386,8 +405,9 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
...
@@ -386,8 +405,9 @@ int sevcli_get_itemdata( pwr_tStatus *sts, sevcli_tCtx ctx, pwr_tOid oid,
for
(;;)
{
for
(;;)
{
rmsg
=
(
sev_sMsgHistDataGet
*
)
qcom_Get
(
sts
,
&
ctx
->
qid
,
&
get
,
tmo
);
rmsg
=
(
sev_sMsgHistDataGet
*
)
qcom_Get
(
sts
,
&
ctx
->
qid
,
&
get
,
tmo
);
if
(
*
sts
==
QCOM__TMO
||
!
rmsg
)
if
(
*
sts
==
QCOM__TMO
||
!
rmsg
)
{
return
0
;
return
0
;
}
if
(
get
.
type
.
b
==
sev_cMsgClass
&&
if
(
get
.
type
.
b
==
sev_cMsgClass
&&
get
.
type
.
s
==
(
qcom_eStype
)
sev_eMsgType_HistDataGet
&&
get
.
type
.
s
==
(
qcom_eStype
)
sev_eMsgType_HistDataGet
&&
...
...
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