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
b74fd4c6
Commit
b74fd4c6
authored
Nov 10, 2008
by
Led
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.9.3-rc3
parent
0b3494b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
interface.c
src/interface.c
+3
-2
main.c
src/main.c
+4
-0
myfprintf.c
src/myfprintf.c
+1
-1
player.c
src/player.c
+1
-1
No files found.
src/interface.c
View file @
b74fd4c6
...
...
@@ -495,11 +495,12 @@ int interfacePrintWithFD(int fd,char * buffer) {
if
(
!
(
buflen
=
strlen
(
buffer
)))
return
-
1
;
for
(
i
=
0
;
i
<
interface_max_connections
;
i
++
)
{
if
(
interfaces
[
i
].
fd
==
fd
)
break
;
if
(
interfaces
[
i
].
open
&&
interfaces
[
i
].
fd
==
fd
)
break
;
}
/* if fd isn't found or interfaces is going to be closed, do nothing */
if
(
i
==
interface_max_connections
||
interfaces
[
i
].
expired
)
return
-
1
;
if
(
i
==
interface_max_connections
)
return
-
1
;
if
(
interfaces
[
i
].
expired
)
return
0
;
interface
=
interfaces
+
i
;
...
...
src/main.c
View file @
b74fd4c6
...
...
@@ -119,6 +119,10 @@ void parseOptions(int argc, char ** argv, Options * options) {
version
();
exit
(
0
);
}
else
{
myfprintf
(
stderr
,
"unknown command line option: %s
\n
"
,
argv
[
i
]);
exit
(
-
1
);
}
}
else
break
;
i
++
;
...
...
src/myfprintf.c
View file @
b74fd4c6
...
...
@@ -55,7 +55,7 @@ void myfprintf(FILE * fp, char * format, ... ) {
fprintf
(
fp
,
"%s : "
,
str
);
vfprintf
(
fp
,
format
,
arglist
);
}
else
if
(
fcntl
)
{
else
if
(
fcntl
ret
&
O_NONBLOCK
)
{
char
buffer
[
BUFFER_LENGTH
+
1
];
vsnprintf
(
buffer
,
BUFFER_LENGTH
,
format
,
arglist
);
if
(
interfacePrintWithFD
(
fd
,
buffer
)
<
0
)
{
...
...
src/player.c
View file @
b74fd4c6
...
...
@@ -93,8 +93,8 @@ int playerInit() {
sigaction
(
SIGTERM
,
&
sa
,
NULL
);
close
(
listenSocket
);
freeAllInterfaces
();
finishPlaylist
();
freeAllInterfaces
();
closeMp3Directory
();
closeTables
();
finishVolume
();
...
...
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