Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix send info encrypt , send callback #691

Merged
merged 5 commits into from
Nov 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/agent/plugins/control-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ function boot(cb) {
websocket.load.call(common, (err, emitter) => {
if (!emitter) return;
setInterval(() => {
module.exports.send_info_encrypt();
module.exports.send_info_encrypt(() => {
})
}, exports.timeout_send_info_encrypt);
emitter.on('command', commands.perform);
});
Expand Down Expand Up @@ -109,8 +110,6 @@ function handle_response(what, err, resp) {

module.exports.send_info_encrypt = function(cb) {
let data = {}


var os_name = os.platform().replace('win32', 'windows').replace('darwin', 'mac'),
system = require(join('./../../../system', os_name));

Expand All @@ -130,7 +129,7 @@ module.exports.send_info_encrypt = function(cb) {
})
}
else {
return cb(new Error('Action only allowed on Windows'));
return typeof(cb) == 'function' && cb(new Error('Action only allowed on Windows'));
}
}

Expand Down