laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/16837 )

Change subject: smpl_buf: Fix str_code() param and print unknown error val
......................................................................

smpl_buf: Fix str_code() param and print unknown error val

Change-Id: I95fadac15b9ad337ebc7cfb44a20dcf803ff8a47
---
M Transceiver52M/device/common/smpl_buf.cpp
M Transceiver52M/device/common/smpl_buf.h
2 files changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve



diff --git a/Transceiver52M/device/common/smpl_buf.cpp 
b/Transceiver52M/device/common/smpl_buf.cpp
index 33161bc..ceca000 100644
--- a/Transceiver52M/device/common/smpl_buf.cpp
+++ b/Transceiver52M/device/common/smpl_buf.cpp
@@ -154,7 +154,7 @@
        return ost.str();
 }

-std::string smpl_buf::str_code(ssize_t code)
+std::string smpl_buf::str_code(int code)
 {
        switch (code) {
        case ERROR_TIMESTAMP:
@@ -166,6 +166,8 @@
        case ERROR_OVERFLOW:
                return "Sample buffer: Overrun";
        default:
-               return "Sample buffer: Unknown error";
+               std::stringstream ss;
+               ss << "Sample buffer: Unknown error " << code;
+               return ss.str();
        }
 }
diff --git a/Transceiver52M/device/common/smpl_buf.h 
b/Transceiver52M/device/common/smpl_buf.h
index ab612de..0b49b82 100644
--- a/Transceiver52M/device/common/smpl_buf.h
+++ b/Transceiver52M/device/common/smpl_buf.h
@@ -68,7 +68,7 @@
            @param code an error code
            @return a formatted error string
        */
-       static std::string str_code(ssize_t code);
+       static std::string str_code(int code);

        enum err_code {
                ERROR_TIMESTAMP = -1,

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/16837
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I95fadac15b9ad337ebc7cfb44a20dcf803ff8a47
Gerrit-Change-Number: 16837
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pes...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilira...@gmail.com>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: osmith <osm...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to