Pau Espin Pedrol has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/13787 )

Change subject: lms: Remove references to ALERT loglevel
......................................................................

lms: Remove references to ALERT loglevel

ALERT log level is not Osmocom standard level, it's just a define in
osmo-trx to keep compatibility with old code.

Same goes for one reference to "ERR" intead of "ERROR".

Change-Id: I0e171a8ac8a8bfa804ac97fba3d73efcfa6424b4
---
M Transceiver52M/device/lms/LMSDevice.cpp
1 file changed, 21 insertions(+), 21 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved



diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index d0c8e19..e971ad4 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -234,7 +234,7 @@

        /* configure antennas */
        if (!set_antennas()) {
-               LOGC(DDEV, ALERT) << "LMS antenna setting failed";
+               LOGC(DDEV, FATAL) << "LMS antenna setting failed";
                goto out_close;
        }

@@ -245,7 +245,7 @@
        return NORMAL;

 out_close:
-       LOGC(DDEV, ALERT) << "Error in LMS open, closing: " << 
LMS_GetLastErrorMessage();
+       LOGC(DDEV, FATAL) << "Error in LMS open, closing: " << 
LMS_GetLastErrorMessage();
        LMS_Close(m_lms_dev);
        m_lms_dev = NULL;
        return -1;
@@ -456,7 +456,7 @@
                rc = LMS_RecvStream(&m_lms_stream_rx[0], &buffer[0], len, 
&rx_metadata, 100);
                LOGC(DDEV, DEBUG) << "Flush: Recv buffer of len " << rc << " at 
" << std::hex << rx_metadata.timestamp;
                if (rc != len) {
-                       LOGC(DDEV, ALERT) << "Flush: Device receive timed out";
+                       LOGC(DDEV, ERROR) << "Flush: Device receive timed out";
                        return false;
                }

@@ -472,18 +472,18 @@
        int idx;

        if (chan >= rx_paths.size()) {
-               LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
+               LOGC(DDEV, ERROR) << "Requested non-existent channel " << chan;
                return false;
        }

        idx = get_ant_idx(ant, LMS_CH_RX, chan);
        if (idx < 0) {
-               LOGC(DDEV, ALERT) << "Invalid Rx Antenna";
+               LOGC(DDEV, ERROR) << "Invalid Rx Antenna";
                return false;
        }

        if (LMS_SetAntenna(m_lms_dev, LMS_CH_RX, chan, idx) < 0) {
-               LOGC(DDEV, ALERT) << "Unable to set Rx Antenna";
+               LOGC(DDEV, ERROR) << "Unable to set Rx Antenna";
        }

        return true;
@@ -495,18 +495,18 @@
        int idx;

        if (chan >= rx_paths.size()) {
-               LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
+               LOGC(DDEV, ERROR) << "Requested non-existent channel " << chan;
                return "";
        }

        idx = LMS_GetAntenna(m_lms_dev, LMS_CH_RX, chan);
        if (idx < 0) {
-               LOGC(DDEV, ALERT) << "Error getting Rx Antenna";
+               LOGC(DDEV, ERROR) << "Error getting Rx Antenna";
                return "";
        }

        if (LMS_GetAntennaList(m_lms_dev, LMS_CH_RX, chan, name_list) < idx) {
-               LOGC(DDEV, ALERT) << "Error getting Rx Antenna List";
+               LOGC(DDEV, ERROR) << "Error getting Rx Antenna List";
                return "";
        }

@@ -518,18 +518,18 @@
        int idx;

        if (chan >= tx_paths.size()) {
-               LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
+               LOGC(DDEV, ERROR) << "Requested non-existent channel " << chan;
                return false;
        }

        idx = get_ant_idx(ant, LMS_CH_TX, chan);
        if (idx < 0) {
-               LOGC(DDEV, ALERT) << "Invalid Rx Antenna";
+               LOGC(DDEV, ERROR) << "Invalid Rx Antenna";
                return false;
        }

        if (LMS_SetAntenna(m_lms_dev, LMS_CH_TX, chan, idx) < 0) {
-               LOGC(DDEV, ALERT) << "Unable to set Rx Antenna";
+               LOGC(DDEV, ERROR) << "Unable to set Rx Antenna";
        }

        return true;
@@ -541,18 +541,18 @@
        int idx;

        if (chan >= tx_paths.size()) {
-               LOGC(DDEV, ALERT) << "Requested non-existent channel " << chan;
+               LOGC(DDEV, ERROR) << "Requested non-existent channel " << chan;
                return "";
        }

        idx = LMS_GetAntenna(m_lms_dev, LMS_CH_TX, chan);
        if (idx < 0) {
-               LOGC(DDEV, ALERT) << "Error getting Tx Antenna";
+               LOGC(DDEV, ERROR) << "Error getting Tx Antenna";
                return "";
        }

        if (LMS_GetAntennaList(m_lms_dev, LMS_CH_TX, chan, name_list) < idx) {
-               LOGC(DDEV, ALERT) << "Error getting Tx Antenna List";
+               LOGC(DDEV, ERROR) << "Error getting Tx Antenna List";
                return "";
        }

@@ -603,7 +603,7 @@
        rx_metadata.timestamp = 0;

        if (bufs.size() != chans) {
-               LOGC(DDEV, ALERT) << "Invalid channel combination " << 
bufs.size();
+               LOGC(DDEV, ERROR) << "Invalid channel combination " << 
bufs.size();
                return -1;
        }

@@ -614,12 +614,12 @@
                rc = LMS_RecvStream(&m_lms_stream_rx[i], bufs[i], len, 
&rx_metadata, 100);
                update_stream_stats(i, underrun, overrun);
                if (rc != len) {
-                       LOGC(DDEV, ALERT) << "LMS: Device receive timed out (" 
<< rc << " vs exp " << len << ").";
+                       LOGC(DDEV, ERROR) << "LMS: Device receive timed out (" 
<< rc << " vs exp " << len << ").";
                        thread_enable_cancel(true);
                        return -1;
                }
                if (timestamp != (TIMESTAMP)rx_metadata.timestamp)
-                       LOGC(DDEV, ALERT) << "chan "<< i << " recv buffer of 
len " << rc << " expect " << std::hex << timestamp << " got " << std::hex << 
(TIMESTAMP)rx_metadata.timestamp << " (" << std::hex << rx_metadata.timestamp 
<<") diff=" << rx_metadata.timestamp - timestamp;
+                       LOGC(DDEV, ERROR) << "chan "<< i << " recv buffer of 
len " << rc << " expect " << std::hex << timestamp << " got " << std::hex << 
(TIMESTAMP)rx_metadata.timestamp << " (" << std::hex << rx_metadata.timestamp 
<<") diff=" << rx_metadata.timestamp - timestamp;
                thread_enable_cancel(true);
        }

@@ -644,12 +644,12 @@
        tx_metadata.timestamp = timestamp - ts_offset;  /* Shift Tx time by 
offset */

        if (isControl) {
-               LOGC(DDEV, ERR) << "Control packets not supported";
+               LOGC(DDEV, ERROR) << "Control packets not supported";
                return 0;
        }

        if (bufs.size() != chans) {
-               LOGC(DDEV, ALERT) << "Invalid channel combination " << 
bufs.size();
+               LOGC(DDEV, ERROR) << "Invalid channel combination " << 
bufs.size();
                return -1;
        }

@@ -660,7 +660,7 @@
                thread_enable_cancel(false);
                rc = LMS_SendStream(&m_lms_stream_tx[i], bufs[i], len, 
&tx_metadata, 100);
                if (rc != len) {
-                       LOGC(DDEV, ALERT) << "LMS: Device send timed out";
+                       LOGC(DDEV, ERROR) << "LMS: Device send timed out";
                }

                if (LMS_GetStreamStatus(&m_lms_stream_tx[i], &status) == 0) {

--
To view, visit https://gerrit.osmocom.org/13787
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I0e171a8ac8a8bfa804ac97fba3d73efcfa6424b4
Gerrit-Change-Number: 13787
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>

Reply via email to