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
b25cce46
Commit
b25cce46
authored
Jan 03, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client_new: convert to C++
parent
a2297558
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Makefile.am
Makefile.am
+1
-1
ClientNew.cxx
src/ClientNew.cxx
+7
-3
No files found.
Makefile.am
View file @
b25cce46
...
...
@@ -256,7 +256,7 @@ src_mpd_SOURCES = \
src/client_idle.h
\
src/client_idle.c
\
src/client_list.c
\
src/
client_new.c
\
src/
ClientNew.cxx
\
src/client_process.c
\
src/client_read.c
\
src/client_write.c
\
...
...
src/
client_new.c
→
src/
ClientNew.cxx
View file @
b25cce46
/*
* Copyright (C) 2003-201
1
The Music Player Daemon Project
* Copyright (C) 2003-201
3
The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -18,11 +18,15 @@
*/
#include "config.h"
extern
"C"
{
#include "client_internal.h"
}
#include "fd_util.h"
extern
"C"
{
#include "fifo_buffer.h"
#include "resolver.h"
#include "permission.h"
}
#include "glib_socket.h"
#include <assert.h>
...
...
@@ -99,7 +103,7 @@ client_new(struct player_control *player_control,
g_io_channel_set_buffered
(
client
->
channel
,
false
);
client
->
source_id
=
g_io_add_watch
(
client
->
channel
,
G
_IO_IN
|
G_IO_ERR
|
G_IO_HUP
,
G
IOCondition
(
G_IO_IN
|
G_IO_ERR
|
G_IO_HUP
)
,
client_in_event
,
client
);
client
->
input
=
fifo_buffer_new
(
4096
);
...
...
@@ -136,7 +140,7 @@ client_new(struct player_control *player_control,
static
void
deferred_buffer_free
(
gpointer
data
,
G_GNUC_UNUSED
gpointer
user_data
)
{
struct
deferred_buffer
*
buffer
=
data
;
struct
deferred_buffer
*
buffer
=
(
struct
deferred_buffer
*
)
data
;
g_free
(
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