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
2cbe21c7
Commit
2cbe21c7
authored
Jan 27, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZeroconfAvahi: pass GMainContext to avahi_glib_poll_new()
parent
09880564
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
ZeroconfAvahi.cxx
src/ZeroconfAvahi.cxx
+4
-2
ZeroconfAvahi.hxx
src/ZeroconfAvahi.hxx
+4
-2
ZeroconfGlue.cxx
src/ZeroconfGlue.cxx
+1
-1
No files found.
src/ZeroconfAvahi.cxx
View file @
2cbe21c7
...
...
@@ -21,6 +21,7 @@
#include "ZeroconfAvahi.hxx"
#include "ZeroconfInternal.hxx"
#include "Listen.hxx"
#include "event/Loop.hxx"
#include "mpd_error.h"
#include <glib.h>
...
...
@@ -216,7 +217,7 @@ static void avahiClientCallback(AvahiClient * c, AvahiClientState state,
}
void
AvahiInit
(
const
char
*
serviceName
)
AvahiInit
(
EventLoop
&
loop
,
const
char
*
serviceName
)
{
int
error
;
g_debug
(
"Initializing interface"
);
...
...
@@ -228,7 +229,8 @@ AvahiInit(const char *serviceName)
avahiRunning
=
1
;
avahi_glib_poll
=
avahi_glib_poll_new
(
NULL
,
G_PRIORITY_DEFAULT
);
avahi_glib_poll
=
avahi_glib_poll_new
(
loop
.
GetContext
(),
G_PRIORITY_DEFAULT
);
avahi_poll
=
avahi_glib_poll_get
(
avahi_glib_poll
);
avahiClient
=
avahi_client_new
(
avahi_poll
,
AVAHI_CLIENT_NO_FAIL
,
...
...
src/ZeroconfAvahi.hxx
View file @
2cbe21c7
/*
* 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
...
...
@@ -20,8 +20,10 @@
#ifndef MPD_ZEROCONF_AVAHI_HXX
#define MPD_ZEROCONF_AVAHI_HXX
class
EventLoop
;
void
AvahiInit
(
const
char
*
service_name
);
AvahiInit
(
EventLoop
&
loop
,
const
char
*
service_name
);
void
AvahiDeinit
();
...
...
src/ZeroconfGlue.cxx
View file @
2cbe21c7
...
...
@@ -55,7 +55,7 @@ ZeroconfInit(gcc_unused EventLoop &loop)
serviceName
=
config_get_string
(
CONF_ZEROCONF_NAME
,
SERVICE_NAME
);
#ifdef HAVE_AVAHI
AvahiInit
(
serviceName
);
AvahiInit
(
loop
,
serviceName
);
#endif
#ifdef HAVE_BONJOUR
...
...
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