Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiask88 committed Mar 10, 2024
1 parent 0844358 commit 9c4e7af
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/node_snap7_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ int S7Server::RWAreaCallBack(void *usrPtr, int Sender, int Operation, PS7Tag PTa
}

Napi::Value S7Server::RWBufferCallback(const Napi::CallbackInfo& info) {

Napi::Env env = info.Env();

return env.Undefined();
}

void CallJsEvent(Napi::Env env,
Expand Down Expand Up @@ -383,7 +385,7 @@ S7Server::S7Server(const Napi::CallbackInfo &info) : Napi::ObjectWrap<S7Server>(
tsfn.Unref(env);
tsfnrw.Unref(env);

snap7Server->SetEventsCallback(&EventCallBack, &tsfn);
snap7Server->SetEventsCallback(static_cast<pfn_SrvCallBack>(&EventCallBack), &tsfn);
}

S7Server::~S7Server() {
Expand Down Expand Up @@ -500,7 +502,7 @@ Napi::Value S7Server::SetResourceless(const Napi::CallbackInfo& info) {

int ret;
if (resourceless) {
ret = snap7Server->SetRWAreaCallback(&RWAreaCallBack, tsfnrw);
ret = snap7Server->SetRWAreaCallback(static_cast<pfn_RWAreaCallBack>(&RWAreaCallBack), tsfnrw);
} else {
ret = snap7Server->SetRWAreaCallback(NULL, NULL);
}
Expand Down

0 comments on commit 9c4e7af

Please sign in to comment.