Error handling fix

This commit is contained in:
Pavel Kirienko
2014-03-14 22:17:00 +04:00
parent 613efa49b9
commit 6e49c2aeaf
2 changed files with 2 additions and 2 deletions
@@ -190,7 +190,7 @@ public:
* Starting the subscriber
*/
const int subscriber_res = SubscriberType::startAsServiceResponseListener();
if (subscriber_res <= 0)
if (subscriber_res < 0)
{
UAVCAN_TRACE("ServiceClient", "Failed to start the subscriber, error: %i", subscriber_res);
cancel();
@@ -49,7 +49,7 @@ private:
const int res = publisher_.publish(response_, TransferTypeServiceResponse, request.getSrcNodeID(),
request.getTransferID());
if (res <= 0)
if (res < 0)
{
UAVCAN_TRACE("ServiceServer", "Response publication failure: %i", res);
response_failure_count_++;