Hello community,

here is the log from the commit of package soapy-uhd for openSUSE:Factory 
checked in at 2018-12-14 20:54:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/soapy-uhd (Old)
 and      /work/SRC/openSUSE:Factory/.soapy-uhd.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "soapy-uhd"

Fri Dec 14 20:54:38 2018 rev:4 rq:657890 version:0.3.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/soapy-uhd/soapy-uhd.changes      2018-11-12 
09:44:58.384868948 +0100
+++ /work/SRC/openSUSE:Factory/.soapy-uhd.new.28833/soapy-uhd.changes   
2018-12-14 20:56:58.948756675 +0100
@@ -1,0 +2,7 @@
+Thu Dec 13 12:27:36 UTC 2018 - Wojciech Kazubski <[email protected]>
+
+- Update to version 0.3.5
+  * Create fake channels if the number of TX and RX channels
+    are not equal to fix segmentation faults in UHD based tools
+
+-------------------------------------------------------------------

Old:
----
  soapy-uhd-0.3.4.tar.gz

New:
----
  soapy-uhd-0.3.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ soapy-uhd.spec ++++++
--- /var/tmp/diff_new_pack.m1pd0t/_old  2018-12-14 20:56:59.416756094 +0100
+++ /var/tmp/diff_new_pack.m1pd0t/_new  2018-12-14 20:56:59.420756089 +0100
@@ -20,7 +20,7 @@
 %define soapy_modname soapysdr%{soapy_modver}-module-uhd
 
 Name:           soapy-uhd
-Version:        0.3.4
+Version:        0.3.5
 Release:        0
 Summary:        Soapy SDR plugins for UHD supported SDR devices
 License:        GPL-3.0

++++++ soapy-uhd-0.3.4.tar.gz -> soapy-uhd-0.3.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyUHD-soapy-uhd-0.3.4/Changelog.txt 
new/SoapyUHD-soapy-uhd-0.3.5/Changelog.txt
--- old/SoapyUHD-soapy-uhd-0.3.4/Changelog.txt  2017-12-15 02:43:42.000000000 
+0100
+++ new/SoapyUHD-soapy-uhd-0.3.5/Changelog.txt  2018-12-08 04:14:03.000000000 
+0100
@@ -1,3 +1,9 @@
+Release 0.3.5 (2018-12-07)
+==========================
+
+- Create fake channels if the number of TX and RX channels
+  are not equal to fix segmentation faults in UHD based tools
+
 Release 0.3.4 (2017-12-14)
 ==========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyUHD-soapy-uhd-0.3.4/UHDSoapyDevice.cpp 
new/SoapyUHD-soapy-uhd-0.3.5/UHDSoapyDevice.cpp
--- old/SoapyUHD-soapy-uhd-0.3.4/UHDSoapyDevice.cpp     2017-12-15 
02:43:42.000000000 +0100
+++ new/SoapyUHD-soapy-uhd-0.3.5/UHDSoapyDevice.cpp     2018-12-08 
04:14:03.000000000 +0100
@@ -1,4 +1,5 @@
 // Copyright (c) 2015-2017 Josh Blum
+// Copyright (c) 2018 Deepwave Digital, Inc.
 // SPDX-License-Identifier: GPL-3.0
 
 #ifdef UHD_HAS_SET_PUBLISHER
@@ -36,6 +37,8 @@
 #include <boost/weak_ptr.hpp>
 #include <boost/algorithm/string.hpp>
 
+#include <algorithm>
+
 //Report a positive gain step value for UHD's automatic distribution algorithm.
 //This prevents the gain group rounding algorithm from producing zero values.
 static const double MIN_GAIN_STEP = 0.1;
@@ -151,7 +154,7 @@
         if (stream) stream->issue_stream_cmd(cmd);
     }
 
-    void setupChannelHooks(const int dir);
+    void setupChannelHooks();
     void setupChannelHooks(const int dir, const size_t chan, const std::string 
&dirName, const std::string &chName);
     void setupFakeChannelHooks(const int dir, const size_t chan, const 
std::string &dirName, const std::string &chName);
 
@@ -276,8 +279,7 @@
     }
 
     //setup channel and frontend hooks
-    this->setupChannelHooks(SOAPY_SDR_RX);
-    this->setupChannelHooks(SOAPY_SDR_TX);
+    this->setupChannelHooks();
 }
 
 UHDSoapyDevice::~UHDSoapyDevice(void)
@@ -286,17 +288,31 @@
     SoapySDR::Device::unmake(_device);
 }
 
-void UHDSoapyDevice::setupChannelHooks(const int dir)
+void UHDSoapyDevice::setupChannelHooks()
 {
-    const std::string dirName((dir==SOAPY_SDR_RX)?"rx":"tx");
-    for (size_t ch = 0; ch < _device->getNumChannels(dir); ch++)
+    static const std::string kRxDirName = "rx";
+    static const std::string kTxDirName = "tx";
+    const size_t numRxChannels = _device->getNumChannels(SOAPY_SDR_RX);
+    const size_t numTxChannels = _device->getNumChannels(SOAPY_SDR_TX);
+
+    //We have to build up the same number of TX and RX channels to make UHD
+    //happy. If there are less channels in one direction than another, we fill
+    //in the direction with dummy channels.
+    const size_t numChannels = std::max(numRxChannels, numTxChannels);
+
+    for (size_t ch = 0; ch < numChannels; ch++)
     {
         const std::string chName(boost::lexical_cast<std::string>(ch));
-        this->setupChannelHooks(dir, ch, dirName, chName);
+        if (ch < numRxChannels)
+            this->setupChannelHooks(SOAPY_SDR_RX, ch, kRxDirName, chName);
+        else
+            this->setupFakeChannelHooks(SOAPY_SDR_RX, ch, kRxDirName, chName);
+
+        if (ch < numTxChannels)
+            this->setupChannelHooks(SOAPY_SDR_TX, ch, kTxDirName, chName);
+        else
+            this->setupFakeChannelHooks(SOAPY_SDR_TX, ch, kTxDirName, chName);
     }
-
-    //cant have a completely empty direction for apps to work
-    if (_device->getNumChannels(dir) == 0) this->setupFakeChannelHooks(dir, 0, 
dirName, "0");
 }
 
 void UHDSoapyDevice::setupChannelHooks(const int dir, const size_t chan, const 
std::string &dirName, const std::string &chName)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyUHD-soapy-uhd-0.3.4/debian/changelog 
new/SoapyUHD-soapy-uhd-0.3.5/debian/changelog
--- old/SoapyUHD-soapy-uhd-0.3.4/debian/changelog       2017-12-15 
02:43:42.000000000 +0100
+++ new/SoapyUHD-soapy-uhd-0.3.5/debian/changelog       2018-12-08 
04:14:03.000000000 +0100
@@ -1,3 +1,9 @@
+soapyuhd (0.3.5-1) unstable; urgency=low
+
+  * Release 0.3.5 (2018-12-07)
+
+ -- Josh Blum <[email protected]>  Fri, 07 Dec 2018 21:13:46 -0000
+
 soapyuhd (0.3.4-1) unstable; urgency=low
 
   * Release 0.3.4 (2017-12-14)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapyUHD-soapy-uhd-0.3.4/debian/control 
new/SoapyUHD-soapy-uhd-0.3.5/debian/control
--- old/SoapyUHD-soapy-uhd-0.3.4/debian/control 2017-12-15 02:43:42.000000000 
+0100
+++ new/SoapyUHD-soapy-uhd-0.3.5/debian/control 2018-12-08 04:14:03.000000000 
+0100
@@ -8,12 +8,12 @@
     libboost-all-dev,
     libuhd-dev,
     libsoapysdr-dev
-Standards-Version: 3.9.8
+Standards-Version: 4.1.4
 Homepage: https://github.com/pothosware/SoapyUHD/wiki
 Vcs-Git: https://github.com/pothosware/SoapyUHD.git
 Vcs-Browser: https://github.com/pothosware/SoapyUHD
 
-Package: soapysdr0.6-module-uhd
+Package: soapysdr0.7-module-uhd
 Architecture: any
 Multi-Arch: same
 Depends: ${shlibs:Depends}, ${misc:Depends}
@@ -22,7 +22,7 @@
 
 Package: soapysdr-module-uhd
 Architecture: all
-Depends: soapysdr0.6-module-uhd, ${misc:Depends}
+Depends: soapysdr0.7-module-uhd, ${misc:Depends}
 Description: Soapy UHD - UHD devices for Soapy SDR.
  A Soapy module that supports UHD devices within the Soapy API.
  .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyUHD-soapy-uhd-0.3.4/debian/soapysdr0.6-module-uhd.install 
new/SoapyUHD-soapy-uhd-0.3.5/debian/soapysdr0.6-module-uhd.install
--- old/SoapyUHD-soapy-uhd-0.3.4/debian/soapysdr0.6-module-uhd.install  
2017-12-15 02:43:42.000000000 +0100
+++ new/SoapyUHD-soapy-uhd-0.3.5/debian/soapysdr0.6-module-uhd.install  
1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/lib/*/SoapySDR/modules*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapyUHD-soapy-uhd-0.3.4/debian/soapysdr0.7-module-uhd.install 
new/SoapyUHD-soapy-uhd-0.3.5/debian/soapysdr0.7-module-uhd.install
--- old/SoapyUHD-soapy-uhd-0.3.4/debian/soapysdr0.7-module-uhd.install  
1970-01-01 01:00:00.000000000 +0100
+++ new/SoapyUHD-soapy-uhd-0.3.5/debian/soapysdr0.7-module-uhd.install  
2018-12-08 04:14:03.000000000 +0100
@@ -0,0 +1 @@
+usr/lib/*/SoapySDR/modules*


Reply via email to