Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
b93523c0
Commit
b93523c0
authored
Oct 17, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UpdateGlue: never pass null to update_enqueue()
parent
7ef40de9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
Main.cxx
src/Main.cxx
+1
-1
OtherCommands.cxx
src/OtherCommands.cxx
+3
-3
UpdateGlue.hxx
src/UpdateGlue.hxx
+4
-1
No files found.
src/Main.cxx
View file @
b93523c0
...
...
@@ -468,7 +468,7 @@ int mpd_main(int argc, char *argv[])
if
(
create_db
)
{
/* the database failed to load: recreate the
database */
unsigned
job
=
update_enqueue
(
nullptr
,
true
);
unsigned
job
=
update_enqueue
(
""
,
true
);
if
(
job
==
0
)
FatalError
(
"directory update failed"
);
}
...
...
src/OtherCommands.cxx
View file @
b93523c0
...
...
@@ -157,7 +157,7 @@ handle_lsinfo(Client *client, int argc, char *argv[])
enum
command_return
handle_update
(
Client
*
client
,
gcc_unused
int
argc
,
char
*
argv
[])
{
const
char
*
path
=
NULL
;
const
char
*
path
=
""
;
unsigned
ret
;
assert
(
argc
<=
2
);
...
...
@@ -166,7 +166,7 @@ handle_update(Client *client, gcc_unused int argc, char *argv[])
if
(
*
path
==
0
||
strcmp
(
path
,
"/"
)
==
0
)
/* backwards compatibility with MPD 0.15 */
path
=
NULL
;
path
=
""
;
else
if
(
!
uri_safe_local
(
path
))
{
command_error
(
client
,
ACK_ERROR_ARG
,
"Malformed path"
);
...
...
@@ -188,7 +188,7 @@ handle_update(Client *client, gcc_unused int argc, char *argv[])
enum
command_return
handle_rescan
(
Client
*
client
,
gcc_unused
int
argc
,
char
*
argv
[])
{
const
char
*
path
=
NULL
;
const
char
*
path
=
""
;
unsigned
ret
;
assert
(
argc
<=
2
);
...
...
src/UpdateGlue.hxx
View file @
b93523c0
...
...
@@ -20,6 +20,8 @@
#ifndef MPD_UPDATE_GLUE_HXX
#define MPD_UPDATE_GLUE_HXX
#include "Compiler.h"
void
update_global_init
(
void
);
void
update_global_finish
(
void
);
...
...
@@ -30,10 +32,11 @@ isUpdatingDB(void);
/**
* Add this path to the database update queue.
*
* @param path a path to update; if
NULL or
an empty string,
* @param path a path to update; if an empty string,
* the whole music directory is updated
* @return the job id, or 0 on error
*/
gcc_nonnull_all
unsigned
update_enqueue
(
const
char
*
path
,
bool
discard
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment