Changeset 46d70a


Ignore:
Timestamp:
01/12/12 14:43:58 (17 months ago)
Author:
Micke Prag <micke.prag@…>
Branches:
('master', '668dd99ac278cfd419d67879b141678facea630a')('windows_service_fixes', 'df6bd2788365991d36d5af2a75833b8de2a5860f')
Children:
915d47dc1c4970c1a8c3abe077af197298a4777f
Parents:
5190c42f773010577f33be19f06db2b62d6ea9c4
git-author:
Micke Prag <micke.prag@telldus.se>2012-01-12 11:49:12+01:00
git-committer:
Micke Prag <micke.prag@telldus.se>2012-01-12 14:43:58+01:00
Message:

Return TELLSTICK_ERROR_COMMUNICATION_SERVICE if we timeout when communicating with the service instead of returning success. This closes #152

Location:
telldus-core/client
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • telldus-core/client/Client.cpp

    rb84e8b r46d70a  
    115115int Client::getIntegerFromService(const Message &msg) { 
    116116        std::wstring response = sendToService(msg); 
     117        if (response.compare(L"") == 0) { 
     118                return TELLSTICK_ERROR_COMMUNICATING_SERVICE; 
     119        } 
    117120        return Message::takeInt(&response); 
    118121} 
  • telldus-core/client/telldus-core.cpp

    rb84e8b r46d70a  
    8989 * Error code. Input/command could not be parsed or didn't follow 
    9090 * input rules. 
     91 * 
     92 * @def TELLSTICK_ERROR_COMMUNICATING_SERVICE 
     93 * Error code. Timeout waiting for response from the Telldus Service. 
    9194 * 
    9295 * @def TELLSTICK_ERROR_UNKNOWN 
     
    492495 * @sa TELLSTICK_ERROR_SYNTAX 
    493496 * @sa TELLSTICK_ERROR_BROKEN_PIPE 
     497 * @sa TELLSTICK_ERROR_COMMUNICATING_SERVICE 
    494498 * @sa TELLSTICK_ERROR_UNKNOWN 
    495499 */ 
     
    507511                "Syntax error", 
    508512                "Broken pipe" 
     513                "An error occured while communicating with the Telldus Service" 
    509514        }; 
    510515        std::string strReturn; 
  • telldus-core/client/telldus-core.h

    rb84e8b r46d70a  
    118118#define TELLSTICK_ERROR_SYNTAX -8 
    119119#define TELLSTICK_ERROR_BROKEN_PIPE -9 
     120#define TELLSTICK_ERROR_COMMUNICATING_SERVICE -10 
    120121#define TELLSTICK_ERROR_UNKNOWN -99 
    121122 
Note: See TracChangeset for help on using the changeset viewer.