- Fix sigsegv when editing an entity
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@972 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
c797bf97ae
commit
323ab51210
|
@ -344,8 +344,6 @@ ConcreteHistory::edit_resource(Resource& resource,
|
||||||
size_t places,
|
size_t places,
|
||||||
size_t availability)
|
size_t availability)
|
||||||
{
|
{
|
||||||
reset(false);
|
|
||||||
|
|
||||||
// And preemptable and availability?? FIXME!
|
// And preemptable and availability?? FIXME!
|
||||||
|
|
||||||
DynamicResource* res = dynamic_cast<DynamicResource*>(&resource);
|
DynamicResource* res = dynamic_cast<DynamicResource*>(&resource);
|
||||||
|
@ -353,8 +351,7 @@ ConcreteHistory::edit_resource(Resource& resource,
|
||||||
core.set_name(name);
|
core.set_name(name);
|
||||||
core.set_places(places);
|
core.set_places(places);
|
||||||
|
|
||||||
notify_change();
|
reset(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -382,15 +379,13 @@ ConcreteHistory::edit_process(Process& process,
|
||||||
time_t arrival_time,
|
time_t arrival_time,
|
||||||
prio_t base_priority)
|
prio_t base_priority)
|
||||||
{
|
{
|
||||||
reset(false);
|
|
||||||
|
|
||||||
DynamicProcess* proc = dynamic_cast<DynamicProcess*>(&process);
|
DynamicProcess* proc = dynamic_cast<DynamicProcess*>(&process);
|
||||||
StaticProcess& core = proc->get_core();
|
StaticProcess& core = proc->get_core();
|
||||||
core.set_name(name);
|
core.set_name(name);
|
||||||
core.set_arrival_time(arrival_time);
|
core.set_arrival_time(arrival_time);
|
||||||
core.set_priority(base_priority);
|
core.set_priority(base_priority);
|
||||||
|
|
||||||
notify_change();
|
reset(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -421,8 +416,6 @@ ConcreteHistory::edit_thread(Thread& thread,
|
||||||
time_t arrival_time,
|
time_t arrival_time,
|
||||||
prio_t base_priority)
|
prio_t base_priority)
|
||||||
{
|
{
|
||||||
reset(false);
|
|
||||||
|
|
||||||
DynamicThread* thre = dynamic_cast<DynamicThread*>(&thread);
|
DynamicThread* thre = dynamic_cast<DynamicThread*>(&thread);
|
||||||
StaticThread& core = thre->get_core();
|
StaticThread& core = thre->get_core();
|
||||||
core.set_name(name);
|
core.set_name(name);
|
||||||
|
@ -430,7 +423,7 @@ ConcreteHistory::edit_thread(Thread& thread,
|
||||||
core.set_arrival_time(arrival_time);
|
core.set_arrival_time(arrival_time);
|
||||||
core.set_priority(base_priority);
|
core.set_priority(base_priority);
|
||||||
|
|
||||||
notify_change();
|
reset(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicRequest&
|
DynamicRequest&
|
||||||
|
@ -455,13 +448,11 @@ void
|
||||||
ConcreteHistory::edit_request(Request& request,
|
ConcreteHistory::edit_request(Request& request,
|
||||||
time_t instant)
|
time_t instant)
|
||||||
{
|
{
|
||||||
reset(false);
|
|
||||||
|
|
||||||
DynamicRequest* req = dynamic_cast<DynamicRequest*>(&request);
|
DynamicRequest* req = dynamic_cast<DynamicRequest*>(&request);
|
||||||
StaticRequest& core = req->get_core();
|
StaticRequest& core = req->get_core();
|
||||||
core.set_instant(instant);
|
core.set_instant(instant);
|
||||||
|
|
||||||
notify_change();
|
reset(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -488,14 +479,12 @@ ConcreteHistory::edit_subrequest(SubRequest& subrequest,
|
||||||
resource_key_t resource_key,
|
resource_key_t resource_key,
|
||||||
time_t duration)
|
time_t duration)
|
||||||
{
|
{
|
||||||
reset(false);
|
|
||||||
|
|
||||||
DynamicSubRequest* sreq = dynamic_cast<DynamicSubRequest*>(&subrequest);
|
DynamicSubRequest* sreq = dynamic_cast<DynamicSubRequest*>(&subrequest);
|
||||||
StaticSubRequest& core = sreq->get_core();
|
StaticSubRequest& core = sreq->get_core();
|
||||||
core.set_resource_key(resource_key);
|
core.set_resource_key(resource_key);
|
||||||
core.set_length(duration);
|
core.set_length(duration);
|
||||||
|
|
||||||
notify_change();
|
reset(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue