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
e9f1b53a
Commit
e9f1b53a
authored
Mar 06, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command, ack: add ack_quark()
To pass ack values around.
parent
5016839b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
ack.h
src/ack.h
+12
-0
command.c
src/command.c
+4
-0
No files found.
src/ack.h
View file @
e9f1b53a
...
...
@@ -20,6 +20,8 @@
#ifndef MPD_ACK_H
#define MPD_ACK_H
#include <glib.h>
enum
ack
{
ACK_ERROR_NOT_LIST
=
1
,
ACK_ERROR_ARG
=
2
,
...
...
@@ -36,4 +38,14 @@ enum ack {
ACK_ERROR_EXIST
=
56
,
};
/**
* Quark for GError.domain; the code is an enum #ack.
*/
G_GNUC_CONST
static
inline
GQuark
ack_quark
(
void
)
{
return
g_quark_from_static_string
(
"ack"
);
}
#endif
src/command.c
View file @
e9f1b53a
...
...
@@ -183,6 +183,10 @@ print_error(struct client *client, GError *error)
enum
playlist_result
result
=
error
->
code
;
g_error_free
(
error
);
return
print_playlist_result
(
client
,
result
);
}
else
if
(
error
->
domain
==
ack_quark
())
{
command_error
(
client
,
error
->
code
,
"%s"
,
error
->
message
);
g_error_free
(
error
);
return
COMMAND_RETURN_ERROR
;
}
else
if
(
error
->
domain
==
db_quark
())
{
switch
((
enum
db_error
)
error
->
code
)
{
case
DB_DISABLED
:
...
...
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