unexpected syn is now an error, simplified, log self-update requests specially

This commit is contained in:
john30
2015-02-15 18:36:14 +01:00
parent 1f422e0685
commit 2e92b15ec5
4 changed files with 26 additions and 27 deletions
+2 -1
View File
@@ -26,7 +26,6 @@ const char* getResultCode(result_t resultCode) {
switch (resultCode) {
case RESULT_OK: return "done";
case RESULT_IN_ESC: return "escape sequence received";
case RESULT_SYN: return "SYN received";
case RESULT_EMPTY: return "empty";
case RESULT_ERR_GENERIC_IO: return "ERR: generic I/O error";
case RESULT_ERR_DEVICE: return "ERR: generic device error";
@@ -49,6 +48,8 @@ const char* getResultCode(result_t resultCode) {
case RESULT_ERR_ACK: return "ERR: ACK error";
case RESULT_ERR_NAK: return "ERR: NAK received";
case RESULT_ERR_NO_SIGNAL: return "ERR: no signal";
case RESULT_ERR_SYN: return "ERR: SYN received";
default:
if (resultCode >= 0)
return "done: unknown result code";
+2 -2
View File
@@ -25,8 +25,7 @@
static const int RESULT_OK = 0; //!< success
static const int RESULT_IN_ESC = 1; //!< start of escape sequence received
static const int RESULT_SYN = 2; //!< regular SYN after message received
static const int RESULT_EMPTY = 3; //!< empty result
static const int RESULT_EMPTY = 2; //!< empty result
static const int RESULT_ERR_GENERIC_IO = -1; //!< generic I/O error (usually fatal)
static const int RESULT_ERR_DEVICE = -2; //!< generic device error (usually fatal)
@@ -52,6 +51,7 @@ static const int RESULT_ERR_ACK = -19; //!< ACK error
static const int RESULT_ERR_NAK = -20; //!< NAK received
static const int RESULT_ERR_NO_SIGNAL = -21; //!< no signal found on the bus
static const int RESULT_ERR_SYN = -22; //!< SYN received instead of answer
/** type for result code. */
typedef int result_t;