Open Niels-Be opened 6 years ago
Hey, is this going to be looked at? I'd rather not have modules pollute my stdout, and create useless log entries. I understand that not being able to encode a response is an issue and should be reported, but empty replies are features, features which some daemons expect, like bluetoothd. I'd rather not train myself to ignore messages like these in case I actually am making a mistake.
If a service method has no return value an message is printed on stdout.
https://github.com/Shouqun/node-dbus/blob/7c87b54cb5a107e6b3d3c610cc1f64cd2d26c4ec/src/object_handler.cc#L88-L90
This is because
reply_value
isundefined
andEncodeObject
returns false in that case. https://github.com/Shouqun/node-dbus/blob/7c87b54cb5a107e6b3d3c610cc1f64cd2d26c4ec/src/encoder.cc#L163-L164Since the error is ignored anyways and it works just fine, a solution might be just to return true in that case. However I don't know the impact on other code. So maybe just do the check before even calling
Encoder::EncodeObject
inObjectHandler::_SendMessageReply
.Let me know what to do and I can submit an PR.
Example that causes this output: