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
4665f2bf
Commit
4665f2bf
authored
Sep 07, 2008
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tag: don't pass "fd" to printVisitedInTagTracker()
Pass the client struct instead of the raw file descriptor.
parent
94293149
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
dbUtils.c
src/dbUtils.c
+1
-1
tagTracker.c
src/tagTracker.c
+5
-6
tagTracker.h
src/tagTracker.h
+3
-1
No files found.
src/dbUtils.c
View file @
4665f2bf
...
...
@@ -335,7 +335,7 @@ int listAllUniqueTags(struct client *client, int type, int numConditionals,
&
data
);
if
(
type
>=
0
&&
type
<=
TAG_NUM_OF_ITEM_TYPES
)
{
printVisitedInTagTracker
(
client
_get_fd
(
client
)
,
type
);
printVisitedInTagTracker
(
client
,
type
);
}
freeListCommandItem
(
item
);
...
...
src/tagTracker.c
View file @
4665f2bf
...
...
@@ -20,7 +20,7 @@
#include "tag.h"
#include "utils.h"
#include "
myfprintf
.h"
#include "
client
.h"
#include "directory.h"
struct
visited
{
...
...
@@ -106,13 +106,12 @@ void visitInTagTracker(int type, const char *str)
++
num_visited
[
type
];
}
void
printVisitedInTagTracker
(
int
fd
,
int
type
)
void
printVisitedInTagTracker
(
struct
client
*
client
,
int
type
)
{
struct
visited
*
v
;
for
(
v
=
visited_heads
[
type
];
v
!=
NULL
;
v
=
v
->
next
)
fdprintf
(
fd
,
"%s: %s
\n
"
,
mpdTagItemKeys
[
type
],
v
->
value
);
client_printf
(
client
,
"%s: %s
\n
"
,
mpdTagItemKeys
[
type
],
v
->
value
);
}
src/tagTracker.h
View file @
4665f2bf
...
...
@@ -19,6 +19,8 @@
#ifndef TAG_TRACKER_H
#define TAG_TRACKER_H
struct
client
;
int
getNumberOfTagItems
(
int
type
);
void
printMemorySavedByTagTracker
(
void
);
...
...
@@ -27,6 +29,6 @@ void resetVisitedFlagsInTagTracker(int type);
void
visitInTagTracker
(
int
type
,
const
char
*
str
);
void
printVisitedInTagTracker
(
int
fd
,
int
type
);
void
printVisitedInTagTracker
(
struct
client
*
client
,
int
type
);
#endif
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