rpms/drumstick/devel drumstick-0.3.1-sysinfo-#597354.patch, NONE, 1.1 drumstick.spec, 1.7, 1.8
Kevin Kofler
kkofler at fedoraproject.org
Fri May 28 22:43:30 UTC 2010
Author: kkofler
Update of /cvs/pkgs/rpms/drumstick/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv19515/devel
Modified Files:
drumstick.spec
Added Files:
drumstick-0.3.1-sysinfo-#597354.patch
Log Message:
* Fri May 28 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 0.3.1-2
- sysinfo: don't crash when no timer module available (#597354, upstream patch)
drumstick-0.3.1-sysinfo-#597354.patch:
sysinfo.cpp | 72 ++++++++++++++++++++++++++++++++++--------------------------
1 file changed, 41 insertions(+), 31 deletions(-)
--- NEW FILE drumstick-0.3.1-sysinfo-#597354.patch ---
Index: tests/sysinfo/sysinfo.cpp
===================================================================
--- tests/sysinfo/sysinfo.cpp (revision 174)
+++ tests/sysinfo/sysinfo.cpp (revision 175)
@@ -40,22 +40,26 @@
for( it = lst.constBegin(); it != lst.constEnd(); ++it )
{
TimerId id = *it;
- Timer* timer = new Timer(id, SND_TIMER_OPEN_NONBLOCK);
- TimerInfo info = timer->getTimerInfo();
- cout << qSetFieldWidth(7) << left << info.getId()
- << qSetFieldWidth(20) << left << info.getName().left(20)
- << qSetFieldWidth(0) << " "
- << id.getClass() << "/" << id.getSlaveClass() << "/"
- << id.getCard() << "/" << id.getDevice() << "/"
- << id.getSubdevice() << " ";
- if( info.isSlave() ) {
- cout << "SLAVE";
- } else {
- long freq = info.getFrequency();
- cout << freq << " Hz";
+ try {
+ Timer* timer = new Timer(id, SND_TIMER_OPEN_NONBLOCK);
+ TimerInfo info = timer->getTimerInfo();
+ cout << qSetFieldWidth(7) << left << info.getId()
+ << qSetFieldWidth(20) << left << info.getName().left(20)
+ << qSetFieldWidth(0) << " "
+ << id.getClass() << "/" << id.getSlaveClass() << "/"
+ << id.getCard() << "/" << id.getDevice() << "/"
+ << id.getSubdevice() << " ";
+ if( info.isSlave() ) {
+ cout << "SLAVE";
+ } else {
+ long freq = info.getFrequency();
+ cout << freq << " Hz";
+ }
+ cout << endl;
+ delete timer;
+ } catch (SequencerError& err) {
+ cout << "Error opening timer:" << err.qstrError();
}
- cout << endl;
- delete timer;
}
delete query;
}
@@ -74,22 +78,28 @@
QueueTempo qtmp = queue->getTempo();
QueueTimer qtmr = queue->getTimer();
TimerId tid(qtmr.getId());
- Timer* timer = new Timer(tid, SND_TIMER_OPEN_NONBLOCK);
- TimerInfo tinfo = timer->getTimerInfo();
- cout << qSetFieldWidth(3) << left << qinfo.getId()
- << qSetFieldWidth(20) << qinfo.getName().left(20)
- << qSetFieldWidth(0) << " "
- << qSetFieldWidth(20) << tinfo.getName().left(20)
- << qSetFieldWidth(6) << right << qinfo.getOwner()
- << qSetFieldWidth(7) << (qinfo.isLocked() ? "locked" : "free")
- << qSetFieldWidth(8) << (qsts.isRunning() ? "running" : "stopped")
- << qSetFieldWidth(4) << qtmp.getPPQ()
- << qSetFieldWidth(7) << qtmp.getRealBPM()
- << qSetFieldWidth(4) << qtmp.getNominalBPM()
- << qSetFieldWidth(8) << qsts.getTickTime()
- << qSetFieldWidth(0) << " " << qsts.getClockTime()
- << endl;
- delete timer;
+ QString tname;
+ try {
+ Timer* timer = new Timer(tid, SND_TIMER_OPEN_NONBLOCK);
+ TimerInfo tinfo = timer->getTimerInfo();
+ tname = tinfo.getName();
+ delete timer;
+ } catch (SequencerError& err) {
+ tname = "inaccessible";
+ }
+ cout << qSetFieldWidth(3) << left << qinfo.getId()
+ << qSetFieldWidth(20) << qinfo.getName().left(20)
+ << qSetFieldWidth(0) << " "
+ << qSetFieldWidth(20) << tname.left(20)
+ << qSetFieldWidth(6) << right << qinfo.getOwner()
+ << qSetFieldWidth(7) << (qinfo.isLocked() ? "locked" : "free")
+ << qSetFieldWidth(8) << (qsts.isRunning() ? "running" : "stopped")
+ << qSetFieldWidth(4) << qtmp.getPPQ()
+ << qSetFieldWidth(7) << qtmp.getRealBPM()
+ << qSetFieldWidth(4) << qtmp.getNominalBPM()
+ << qSetFieldWidth(8) << qsts.getTickTime()
+ << qSetFieldWidth(0) << " " << qsts.getClockTime()
+ << endl;
delete queue;
}
}
Index: drumstick.spec
===================================================================
RCS file: /cvs/pkgs/rpms/drumstick/devel/drumstick.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- drumstick.spec 28 May 2010 21:59:59 -0000 1.7
+++ drumstick.spec 28 May 2010 22:43:30 -0000 1.8
@@ -1,7 +1,7 @@
Summary: C++/Qt4 wrapper around the ALSA library sequencer interface
Name: drumstick
Version: 0.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
#define svn svn
Group: System Environment/Libraries
@@ -10,6 +10,8 @@ URL: http://drumstick.sourceforge.ne
Source0: http://downloads.sourceforge.net/project/drumstick/%{version}%{?svn}/drumstick-%{version}%{?svn}.tar.bz2
# fix FTBFS due to the strict ld in Fedora >= 13
Patch0: drumstick-0.3.1-fix-implicit-linking.patch
+# sysinfo: don't crash when no timer module available (#597354, upstream patch)
+Patch1: drumstick-0.3.1-sysinfo-#597354.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake qt4-devel alsa-lib-devel desktop-file-utils
@@ -47,6 +49,7 @@ This package contains the test/example p
%prep
%setup -q -n %{name}-%{version}%{?svn}
%patch0 -p1 -b .implicit-linking
+%patch1 -p0 -b .sysinfo-#597354
%build
@@ -117,6 +120,9 @@ gtk-update-icon-cache %{_datadir}/icons/
%changelog
+* Fri May 28 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 0.3.1-2
+- sysinfo: don't crash when no timer module available (#597354, upstream patch)
+
* Fri May 28 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 0.3.1-1
- update to 0.3.1
- fix FTBFS due to the strict ld in Fedora >= 13
More information about the scm-commits
mailing list