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
c9fcc7f1
Commit
c9fcc7f1
authored
Sep 04, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system/resolver: convert to C++
parent
d1f4a31b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
27 deletions
+17
-27
Makefile.am
Makefile.am
+2
-2
ClientNew.cxx
src/ClientNew.cxx
+1
-3
ServerSocket.cxx
src/event/ServerSocket.cxx
+1
-1
HttpdOutputPlugin.cxx
src/output/HttpdOutputPlugin.cxx
+1
-1
Resolver.cxx
src/system/Resolver.cxx
+7
-7
Resolver.hxx
src/system/Resolver.hxx
+3
-11
run_resolver.cxx
test/run_resolver.cxx
+2
-2
No files found.
Makefile.am
View file @
c9fcc7f1
...
...
@@ -285,7 +285,7 @@ libsystem_a_SOURCES = \
src/system/fd_util.c src/system/fd_util.h
\
src/system/SocketUtil.cxx src/system/SocketUtil.hxx
\
src/system/SocketError.hxx
\
src/system/
resolver.c src/system/resolver.h
\
src/system/
Resolver.cxx src/system/Resolver.hxx
\
src/system/EventPipe.cxx src/system/EventPipe.hxx
\
src/system/EventFD.cxx src/system/EventFD.hxx
\
src/system/SignalFD.cxx src/system/SignalFD.hxx
\
...
...
@@ -1072,7 +1072,7 @@ test_read_conf_SOURCES = test/read_conf.cxx
test_run_resolver_LDADD
=
\
libsystem.a
\
$(GLIB_LIBS)
test_run_resolver_SOURCES
=
test
/run_resolver.c
test_run_resolver_SOURCES
=
test
/run_resolver.c
xx
test_DumpDatabase_LDADD
=
\
$(DB_LIBS)
\
...
...
src/ClientNew.cxx
View file @
c9fcc7f1
...
...
@@ -23,9 +23,7 @@
#include "Partition.hxx"
#include "Instance.hxx"
#include "system/fd_util.h"
extern
"C"
{
#include "system/resolver.h"
}
#include "system/Resolver.hxx"
#include "Permission.hxx"
#include <assert.h>
...
...
src/event/ServerSocket.cxx
View file @
c9fcc7f1
...
...
@@ -27,7 +27,7 @@
#include "system/SocketUtil.hxx"
#include "system/SocketError.hxx"
#include "event/SocketMonitor.hxx"
#include "system/
resolver.h
"
#include "system/
Resolver.hxx
"
#include "system/fd_util.h"
#include <sys/types.h>
...
...
src/output/HttpdOutputPlugin.cxx
View file @
c9fcc7f1
...
...
@@ -24,7 +24,7 @@
#include "OutputAPI.hxx"
#include "EncoderPlugin.hxx"
#include "EncoderList.hxx"
#include "system/
resolver.h
"
#include "system/
Resolver.hxx
"
#include "Page.hxx"
#include "IcyMetaDataServer.hxx"
#include "system/fd_util.h"
...
...
src/system/
resolver.c
→
src/system/
Resolver.cxx
View file @
c9fcc7f1
/*
* 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,7 +18,7 @@
*/
#include "config.h"
#include "
resolver.h
"
#include "
Resolver.hxx
"
#ifndef G_OS_WIN32
#include <sys/socket.h>
...
...
@@ -120,11 +120,11 @@ resolve_host_port(const char *host_port, unsigned default_port,
if
((
flags
&
AI_PASSIVE
)
!=
0
&&
strcmp
(
host
,
"*"
)
==
0
)
host
=
NULL
;
const
struct
addrinfo
hints
=
{
.
ai_flags
=
flags
,
.
ai_family
=
AF_UNSPEC
,
.
ai_socktype
=
socktype
,
}
;
addrinfo
hints
;
memset
(
&
hints
,
0
,
sizeof
(
hints
));
hints
.
ai_flags
=
flags
;
hints
.
ai_family
=
AF_UNSPEC
;
hints
.
ai_socktype
=
socktype
;
struct
addrinfo
*
ai
;
int
ret
=
getaddrinfo
(
host
,
port
,
&
hints
,
&
ai
);
...
...
src/system/
resolver.h
→
src/system/
Resolver.hxx
View file @
c9fcc7f1
/*
* 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
...
...
@@ -17,8 +17,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_RESOLVER_H
#define MPD_RESOLVER_H
#ifndef MPD_RESOLVER_H
XX
#define MPD_RESOLVER_H
XX
#include "gcc.h"
...
...
@@ -34,10 +34,6 @@ resolver_quark(void)
return
g_quark_from_static_string
(
"resolver"
);
}
#ifdef __cplusplus
extern
"C"
{
#endif
/**
* Converts the specified socket address into a string in the form
* "IP:PORT". The return value must be freed with g_free() when you
...
...
@@ -67,8 +63,4 @@ resolve_host_port(const char *host_port, unsigned default_port,
int
flags
,
int
socktype
,
GError
**
error_r
);
#ifdef __cplusplus
}
#endif
#endif
test/run_resolver.c
→
test/run_resolver.c
xx
View file @
c9fcc7f1
/*
* 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,7 +18,7 @@
*/
#include "config.h"
#include "system/
resolver.h
"
#include "system/
Resolver.hxx
"
#ifdef WIN32
#include <ws2tcpip.h>
...
...
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