mirror of
https://gitlab.com/wirelos/sprocket-lib.git
synced 2025-12-18 14:15:51 +01:00
remove network from activation phase
This commit is contained in:
@@ -18,9 +18,9 @@ Sprocket* Sprocket::init(SprocketConfig cfg){
|
||||
Sprocket* Sprocket::activate() {
|
||||
return activate(&scheduler);
|
||||
}
|
||||
Sprocket* Sprocket::activate(Scheduler* scheduler, Network* network) {
|
||||
Sprocket* Sprocket::activate(Scheduler* scheduler) {
|
||||
// setup plugins
|
||||
activatePlugins(scheduler, network);
|
||||
activatePlugins(scheduler);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ Sprocket* Sprocket::join(Network& net){
|
||||
//net.onReceive(bind(&Sprocket::dispatch,this, _1, _2));
|
||||
net.connect();
|
||||
network = net;
|
||||
return activate(&scheduler, &net);
|
||||
return activate(&scheduler);
|
||||
}
|
||||
|
||||
Sprocket* Sprocket::addTask(Task& tsk){
|
||||
@@ -57,8 +57,8 @@ void Sprocket::addPlugin(Plugin* p){
|
||||
plugins.push_back(p);
|
||||
}
|
||||
|
||||
void Sprocket::activatePlugins(Scheduler* scheduler, Network* network){
|
||||
void Sprocket::activatePlugins(Scheduler* scheduler){
|
||||
for(Plugin* p : plugins){
|
||||
p->activate(scheduler, network);
|
||||
p->activate(scheduler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user