pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/daapd Fix const correctness.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9c7e2e74e12d
branches:  trunk
changeset: 414412:9c7e2e74e12d
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Mar 26 21:51:24 2020 +0000

description:
Fix const correctness.

diffstat:

 audio/daapd/distinfo         |   4 ++--
 audio/daapd/patches/patch-af |  30 ++++++++++++++++++++++++++++--
 2 files changed, 30 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r 4d8c6ddde935 -r 9c7e2e74e12d audio/daapd/distinfo
--- a/audio/daapd/distinfo      Thu Mar 26 21:51:11 2020 +0000
+++ b/audio/daapd/distinfo      Thu Mar 26 21:51:24 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.25 2015/11/03 01:12:28 agc Exp $
+$NetBSD: distinfo,v 1.26 2020/03/26 21:51:24 joerg Exp $
 
 SHA1 (daapd-0.2.4b.tgz) = 0903303f155c19ae12cdc78be05799508156a16b
 RMD160 (daapd-0.2.4b.tgz) = 899b37b3872623ef918f7faa4eb8bad2dfc5b369
@@ -8,7 +8,7 @@
 SHA1 (patch-ac) = 0a4e3dfb010bbf2cc01843987c970548cb4c646f
 SHA1 (patch-ad) = 4b132fc143d3b29ff2235eacb5c2eaa438cd816c
 SHA1 (patch-ae) = 3433d7e944999e10690ccdda1d49d3c711671446
-SHA1 (patch-af) = 1a453dde4dd7d33061a500729b9ef5d89e850133
+SHA1 (patch-af) = 84086c0ee508c07e3cec07a723e07270be667c56
 SHA1 (patch-ag) = cf0dc389fb2a031883f52c348d8303dd36b33818
 SHA1 (patch-daapd.cc) = 9107fc35ca6eb8a9841f986342781769bc29a9d2
 SHA1 (patch-libhttpd_configure) = 91a7a942a078bda76582cbdf0cc1d3ae8b7029cb
diff -r 4d8c6ddde935 -r 9c7e2e74e12d audio/daapd/patches/patch-af
--- a/audio/daapd/patches/patch-af      Thu Mar 26 21:51:11 2020 +0000
+++ b/audio/daapd/patches/patch-af      Thu Mar 26 21:51:24 2020 +0000
@@ -1,7 +1,24 @@
-$NetBSD: patch-af,v 1.1 2007/02/09 20:32:38 drochner Exp $
+$NetBSD: patch-af,v 1.2 2020/03/26 21:51:24 joerg Exp $
 
---- db.cc.orig 2007-02-09 16:49:38.000000000 +0100
+--- db.cc.orig 2006-03-05 13:39:37.000000000 +0000
 +++ db.cc
+@@ -180,14 +180,14 @@ void Database::addMp3( std::string& path
+       
+               if( getId3TextFrame( tag, "TRCK", s ) == 0 ) {
+                       song->tracknumber = strtol( s.c_str(), NULL, 10 );
+-                      char *sp;
++                      const char *sp;
+                       if( ( sp = strchr( s.c_str(), '/' ) ) != 0 ) 
+                               song->trackcount = strtol( sp+1, NULL, 10 );
+               }
+                                       
+               if( getId3TextFrame( tag, "TPOS", s ) == 0 ) {
+                       song->discnumber = strtol( s.c_str(), NULL, 10 );
+-                      char *sp;
++                      const char *sp;
+                       if( ( sp = strchr( s.c_str(), '/' ) ) != 0 ) 
+                               song->disccount = strtol( sp+1, NULL, 10 );
+               }
 @@ -325,7 +325,7 @@ void Database::addM4a( std::string& path
                        MP4TrackId trackId = MP4FindTrackId(mp4file, 0);
                        u32 timeScale = MP4GetTrackTimeScale(mp4file, trackId);
@@ -11,3 +28,12 @@
                        u32 avgBitRate = MP4GetTrackBitRate(mp4file, trackId);
                        song->time = (u32) (msDuration);
                        song->bitrate = (u16) ((avgBitRate + 500) / 1000);
+@@ -413,7 +413,7 @@ int Database::getTypeFromExtension( std:
+       // we just trust the user that files with extension
+       // .mp3 are really mp3 files etc.
+       // metadata in the filesystem would be cool :(
+-      char *pointPos;
++      const char *pointPos;
+       if( ( pointPos = strrchr( fileName.c_str(), '.' ) ) != 0 ) {
+               if( strlen( pointPos ) >= 5 ) {
+                       if( strncasecmp( pointPos, ".aiff", 5 ) == 0 ) {



Home | Main Index | Thread Index | Old Index