Skip to content
Browse files

[tvheadend] check for errors in CHTSPConnection::ReadResult. issue #131

  • Loading branch information...
1 parent 5f5074c commit 315cd9d11fe488ddb3a2cfd87d079d826a0d8bd9 @opdenkamp committed
Showing with 21 additions and 0 deletions.
  1. +21 −0 addons/pvr.hts/src/HTSPConnection.cpp
View
21 addons/pvr.hts/src/HTSPConnection.cpp
@@ -377,6 +377,27 @@ void CHTSPConnection::ReadResult(htsmsg_t *m, CHTSResult &result, const char* st
{
// response received
result.message = message.msg;
+
+ if (result.NoAccess())
+ {
+ // access denied
+ if (strAction)
+ XBMC->Log(LOG_ERROR, "%s - '%s' failed - access denied", __FUNCTION__, strAction);
+ else
+ XBMC->Log(LOG_ERROR, "%s - command failed - access denied", __FUNCTION__);
+ result.status = PVR_ERROR_REJECTED;
+ }
+
+ if (result.IsError())
+ {
+ // server reported an error
+ string strError = result.GetErrorMessage();
+ if (strAction)
+ XBMC->Log(LOG_ERROR, "%s - '%s' failed - %s", __FUNCTION__, strAction, strError.c_str());
+ else
+ XBMC->Log(LOG_ERROR, "%s - command failed - %s", __FUNCTION__, strError.c_str());
+ result.status = PVR_ERROR_REJECTED;
+ }
}
// delete from the queue

0 comments on commit 315cd9d

Please sign in to comment.
Something went wrong with that request. Please try again.