diff options
author | Eric Wong <normalperson@yhbt.net> | 2007-12-28 02:56:25 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2007-12-28 02:56:25 +0000 |
commit | b79f6b882a70526ec2e9fc231e0baeebdfef1e52 (patch) | |
tree | 719912135d059476070834c3c62ae940955e9e20 /src/playerData.c | |
parent | 0d26248a0d8cb2e5cf6be5a438a18b16793bbb63 (diff) | |
download | mpd-b79f6b882a70526ec2e9fc231e0baeebdfef1e52.tar.gz mpd-b79f6b882a70526ec2e9fc231e0baeebdfef1e52.tar.xz mpd-b79f6b882a70526ec2e9fc231e0baeebdfef1e52.zip |
Merge branches/ew r7104
thread-safety work in preparation for rewrite to use pthreads
Expect no regressions against trunk (r7078), possibly minor
performance improvements in update (due to fewer heap
allocations), but increased stack usage.
Applied the following patches:
* maxpath_str for reentrancy (temporary fix, reverted)
* path: start working on thread-safe variants of these methods
* Re-entrancy work on path/character-set conversions
* directory.c: exploreDirectory() use reentrant functions here
* directory/update: more use of reentrant functions + cleanups
* string_toupper: a strdup-less version of strDupToUpper
* get_song_url: a static-variable-free version of getSongUrl()
* Use reentrant/thread-safe get_song_url everywhere
* replace rmp2amp with the reentrant version, rmp2amp_r
* Get rid of the non-reentrant/non-thread-safe rpp2app, too.
* buffer2array: assert strdup() returns a usable value in unit tests
* replace utf8ToFsCharset and fsCharsetToUtf8 with thread-safe variants
* fix storing playlists w/o absolute paths
* parent_path(), a reentrant version of parentPath()
* parentPath => parent_path for reentrancy and thread-safety
* allow "make test" to automatically run embedded unit tests
* remove convStrDup() and maxpath_str()
* use MPD_PATH_MAX everywhere instead of MAXPATHLEN
* path: get rid of appendSlash, pfx_path and just use pfx_dir
* get_song_url: fix the ability to play songs in the top-level music_directory
git-svn-id: https://svn.musicpd.org/mpd/trunk@7106 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/playerData.c')
-rw-r--r-- | src/playerData.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/playerData.c b/src/playerData.c index 380e4a148..69ef56bae 100644 --- a/src/playerData.c +++ b/src/playerData.c @@ -130,9 +130,9 @@ void initPlayerData(void) playerData_pd->playerControl.queueLockState = PLAYER_QUEUE_UNLOCKED; playerData_pd->playerControl.seek = 0; playerData_pd->playerControl.closeAudio = 0; - memset(playerData_pd->playerControl.utf8url, 0, MAXPATHLEN + 1); - memset(playerData_pd->playerControl.erroredUrl, 0, MAXPATHLEN + 1); - memset(playerData_pd->playerControl.currentUrl, 0, MAXPATHLEN + 1); + memset(playerData_pd->playerControl.utf8url, 0, MPD_PATH_MAX); + memset(playerData_pd->playerControl.erroredUrl, 0, MPD_PATH_MAX); + memset(playerData_pd->playerControl.currentUrl, 0, MPD_PATH_MAX); playerData_pd->playerControl.crossFade = crossfade; playerData_pd->playerControl.softwareVolume = 1000; playerData_pd->playerControl.totalPlayTime = 0; @@ -145,7 +145,7 @@ void initPlayerData(void) playerData_pd->decoderControl.state = DECODE_STATE_STOP; playerData_pd->decoderControl.seek = 0; playerData_pd->decoderControl.error = DECODE_ERROR_NOERROR; - memset(playerData_pd->decoderControl.utf8url, 0, MAXPATHLEN + 1); + memset(playerData_pd->decoderControl.utf8url, 0, MPD_PATH_MAX); } PlayerData *getPlayerData(void) |