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
7229c04b
Commit
7229c04b
authored
Jun 26, 2009
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix in eventlist, adding event in a full list could cause segfault
parent
20eb1bea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
xtt/changelog.txt
xtt/changelog.txt
+2
-0
xtt/lib/xtt/src/xtt_evlist.cpp
xtt/lib/xtt/src/xtt_evlist.cpp
+18
-7
xtt/lib/xtt/src/xtt_evlist.h
xtt/lib/xtt/src/xtt_evlist.h
+1
-1
No files found.
xtt/changelog.txt
View file @
7229c04b
...
...
@@ -134,3 +134,5 @@
090518 cs xtt Advanced user set as default, not set with option -d.
090519 cs ge Bugfix in fonts for language se_sv.
090601 cs ge New action: SetValue to set a specified value into an attribute.
090625 cs xtt Bugfix in eventlist, adding event in a full list could cause segfault.
090625 cs xtt Blocklist window title was wrong.
xtt/lib/xtt/src/xtt_evlist.cpp
View file @
7229c04b
...
...
@@ -434,7 +434,8 @@ void EvList::event_info( mh_sMessage *msg)
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
&
event
->
Msg
.
EventSound
,
event
->
Msg
.
EventMoreText
,
msg
->
Status
,
evlist_eEventType_Info
,
dest_node
,
dest_code
);
evlist_eEventType_Info
,
dest_node
,
dest_code
,
&
sts
);
if
(
EVEN
(
sts
))
return
;
size
++
;
}
...
...
@@ -479,7 +480,8 @@ void EvList::event_alarm( mh_sMessage *msg)
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
&
event
->
Msg
.
EventSound
,
event
->
Msg
.
EventMoreText
,
msg
->
Status
,
evlist_eEventType_Alarm
,
dest_node
,
dest_code
);
evlist_eEventType_Alarm
,
dest_node
,
dest_code
,
&
sts
);
if
(
EVEN
(
sts
))
return
;
size
++
;
}
...
...
@@ -527,7 +529,8 @@ void EvList::event_block( mh_sBlock *msg)
text
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Block
,
dest_node
,
dest_code
);
dest_node
,
dest_code
,
&
sts
);
if
(
EVEN
(
sts
))
return
;
size
++
;
break
;
}
...
...
@@ -583,7 +586,8 @@ void EvList::event_block( mh_sBlock *msg)
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Block
,
dest_node
,
dest_code
);
dest_node
,
dest_code
,
&
sts
);
if
(
EVEN
(
sts
))
return
;
switch
(
msg
->
Info
.
EventType
)
{
case
mh_eEvent_Block
:
...
...
@@ -668,7 +672,8 @@ void EvList::event_ack( mh_sAck *msg)
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Ack
,
dest_node
,
dest_code
);
dest_node
,
dest_code
,
&
sts
);
if
(
EVEN
(
sts
))
return
;
size
++
;
}
...
...
@@ -731,7 +736,8 @@ void EvList::event_return( mh_sReturn *msg)
event
->
Info
.
EventName
,
event
->
Info
.
EventFlags
,
event
->
Info
.
EventPrio
,
event
->
Info
.
Id
,
event
->
Info
.
Object
,
0
,
0
,
0
,
evlist_eEventType_Return
,
dest_node
,
dest_code
);
dest_node
,
dest_code
,
&
sts
);
if
(
EVEN
(
sts
))
return
;
size
++
;
}
...
...
@@ -1206,7 +1212,7 @@ ItemAlarm::ItemAlarm( EvList *item_evlist, const char *item_name, pwr_tTime item
unsigned
long
item_eventprio
,
mh_sEventId
item_eventid
,
pwr_tObjid
item_object
,
pwr_tAttrRef
*
item_eventsound
,
char
*
item_eventmoretext
,
unsigned
long
item_status
,
evlist_eEventType
item_event_type
,
brow_tNode
dest
,
flow_eDest
dest_code
)
:
brow_tNode
dest
,
flow_eDest
dest_code
,
int
*
rsts
)
:
event_type
(
item_event_type
),
evlist
(
item_evlist
),
time
(
item_time
),
eventflags
(
item_eventflags
),
eventprio
(
item_eventprio
),
eventid
(
item_eventid
),
object
(
item_object
),
status
(
item_status
)
...
...
@@ -1214,6 +1220,7 @@ ItemAlarm::ItemAlarm( EvList *item_evlist, const char *item_name, pwr_tTime item
type
=
evlist_eItemType_Alarm
;
brow_tNodeClass
nc
;
*
rsts
=
1
;
strcpy
(
name
,
item_name
);
strncpy
(
eventtext
,
Lng
::
translate
(
item_eventtext
),
sizeof
(
eventtext
));
eventtext
[
sizeof
(
eventtext
)
-
1
]
=
0
;
...
...
@@ -1267,6 +1274,10 @@ ItemAlarm::ItemAlarm( EvList *item_evlist, const char *item_name, pwr_tTime item
sts
=
brow_GetLast
(
evlist
->
brow
->
ctx
,
&
last_node
);
if
(
ODD
(
sts
))
{
if
(
node
==
last_node
)
// I'm deleting myself
*
rsts
=
0
;
brow_DeleteNode
(
evlist
->
brow
->
ctx
,
last_node
);
// Note! This ItemAlarm might be deleted by now if node == last_node
...
...
xtt/lib/xtt/src/xtt_evlist.h
View file @
7229c04b
...
...
@@ -206,7 +206,7 @@ class ItemAlarm {
pwr_tObjid
item_object
,
pwr_tAttrRef
*
item_eventsound
,
char
*
item_eventmoretext
,
unsigned
long
item_status
,
evlist_eEventType
item_event_type
,
brow_tNode
dest
,
flow_eDest
dest_code
);
brow_tNode
dest
,
flow_eDest
dest_code
,
int
*
rsts
);
evlist_eItemType
type
;
evlist_eEventType
event_type
;
EvList
*
evlist
;
...
...
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