When handling a service call, the C++ server doesn't check that the service is available, and it also doesn't check whether the service succeeded. If the service fails, the caller should assume it has not touched the reference to the response object. But the response object passed here is an uninitialized ShapeShifter. Therefore, without this fix, the uninitialized ShapeShifter is published as the service response, which is super bad!
There was an unclear note about .call() not returning anything on windows. On Windows? Since when do the rosserial servers run on windows? I hope this was some mistake and actually checking the return value of .call() will not break anything that should work.
When handling a service call, the C++ server doesn't check that the service is available, and it also doesn't check whether the service succeeded. If the service fails, the caller should assume it has not touched the reference to the response object. But the response object passed here is an uninitialized ShapeShifter. Therefore, without this fix, the uninitialized ShapeShifter is published as the service response, which is super bad!
There was an unclear note about
.call()
not returning anything on windows. On Windows? Since when do the rosserial servers run on windows? I hope this was some mistake and actually checking the return value of.call()
will not break anything that should work.