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
1af22729
Commit
1af22729
authored
Jul 12, 2004
by
Warren Dukes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
potential fixes for NHI\'s bugs
git-svn-id:
https://svn.musicpd.org/mpd/trunk@1848
09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent
25c92380
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
interface.c
src/interface.c
+3
-1
myfprintf.c
src/myfprintf.c
+9
-7
No files found.
src/interface.c
View file @
1af22729
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
#define INTERFACE_LIST_MODE_END "command_list_end"
#define INTERFACE_LIST_MODE_END "command_list_end"
#define INTERFACE_DEFAULT_OUT_BUFFER_SIZE 4096
#define INTERFACE_DEFAULT_OUT_BUFFER_SIZE 4096
int
interface_max_connections
;
int
interface_max_connections
=
0
;
int
interface_timeout
;
int
interface_timeout
;
unsigned
long
long
interface_max_command_list_size
;
unsigned
long
long
interface_max_command_list_size
;
unsigned
long
long
interface_max_output_buffer_size
;
unsigned
long
long
interface_max_output_buffer_size
;
...
@@ -472,6 +472,8 @@ void freeAllInterfaces() {
...
@@ -472,6 +472,8 @@ void freeAllInterfaces() {
closeAllInterfaces
();
closeAllInterfaces
();
free
(
interfaces
);
free
(
interfaces
);
interface_max_connections
=
0
;
}
}
void
closeOldInterfaces
()
{
void
closeOldInterfaces
()
{
...
...
src/myfprintf.c
View file @
1af22729
...
@@ -74,13 +74,15 @@ void myfprintf(FILE * fp, char * format, ... ) {
...
@@ -74,13 +74,15 @@ void myfprintf(FILE * fp, char * format, ... ) {
memset
(
buffer
,
0
,
BUFFER_LENGTH
+
1
);
memset
(
buffer
,
0
,
BUFFER_LENGTH
+
1
);
va_start
(
arglist
,
format
);
va_start
(
arglist
,
format
);
if
(
myfprintf_stdLogMode
&&
(
fd
==
1
||
fd
==
2
))
{
if
(
fd
==
1
||
fd
==
2
)
{
time_t
t
=
time
(
NULL
);
if
(
myfprintf_stdLogMode
)
{
if
(
fd
==
1
)
fp
=
myfprintf_out
;
time_t
t
=
time
(
NULL
);
else
fp
=
myfprintf_err
;
if
(
fd
==
1
)
fp
=
myfprintf_out
;
strftime
(
buffer
,
14
,
"%b %e %R"
,
localtime
(
&
t
));
else
fp
=
myfprintf_err
;
blockingWrite
(
fd
,
buffer
,
strlen
(
buffer
));
strftime
(
buffer
,
14
,
"%b %e %R"
,
localtime
(
&
t
));
blockingWrite
(
fd
,
" : "
,
3
);
blockingWrite
(
fd
,
buffer
,
strlen
(
buffer
));
blockingWrite
(
fd
,
" : "
,
3
);
}
vsnprintf
(
buffer
,
BUFFER_LENGTH
,
format
,
arglist
);
vsnprintf
(
buffer
,
BUFFER_LENGTH
,
format
,
arglist
);
blockingWrite
(
fd
,
buffer
,
strlen
(
buffer
));
blockingWrite
(
fd
,
buffer
,
strlen
(
buffer
));
}
}
...
...
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