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
24da9410
Commit
24da9410
authored
Mar 14, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command: use sticker_song_get() instead of sticker_song_list_values()
parent
dd67992a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
command.c
src/command.c
+10
-11
No files found.
src/command.c
View file @
24da9410
...
@@ -1455,11 +1455,12 @@ handle_idle(struct client *client,
...
@@ -1455,11 +1455,12 @@ handle_idle(struct client *client,
}
}
#ifdef ENABLE_SQLITE
#ifdef ENABLE_SQLITE
static
void
print_sticker
(
GString
*
name
,
GString
*
value
,
static
void
struct
client
*
client
)
print_sticker
(
const
char
*
name
,
const
char
*
value
,
gpointer
data
)
{
{
client_printf
(
client
,
"sticker: %s=%s
\n
"
,
struct
client
*
client
=
data
;
(
char
*
)
name
,
(
char
*
)
value
);
client_printf
(
client
,
"sticker: %s=%s
\n
"
,
name
,
value
);
}
}
static
enum
command_return
static
enum
command_return
...
@@ -1488,17 +1489,15 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
...
@@ -1488,17 +1489,15 @@ handle_sticker_song(struct client *client, int argc, char *argv[])
return
COMMAND_RETURN_OK
;
return
COMMAND_RETURN_OK
;
}
else
if
(
argc
==
4
&&
strcmp
(
argv
[
1
],
"list"
)
==
0
)
{
}
else
if
(
argc
==
4
&&
strcmp
(
argv
[
1
],
"list"
)
==
0
)
{
GHashTable
*
hash
;
struct
sticker
*
sticker
=
sticker_song_get
(
song
);
if
(
NULL
==
sticker
)
{
hash
=
sticker_song_list_values
(
song
);
if
(
NULL
==
hash
)
{
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
"no stickers found"
);
"no stickers found"
);
return
COMMAND_RETURN_ERROR
;
return
COMMAND_RETURN_ERROR
;
}
}
g_hash_table_foreach
(
hash
,
(
GHFunc
)
print_sticker
,
client
);
sticker_foreach
(
sticker
,
print_sticker
,
client
);
g_hash_table_destroy
(
hash
);
sticker_free
(
sticker
);
return
COMMAND_RETURN_OK
;
return
COMMAND_RETURN_OK
;
}
else
if
(
argc
==
6
&&
strcmp
(
argv
[
1
],
"set"
)
==
0
)
{
}
else
if
(
argc
==
6
&&
strcmp
(
argv
[
1
],
"set"
)
==
0
)
{
...
...
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