Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
dbus
dbus
Commits
f9192688
Commit
f9192688
authored
Mar 05, 2015
by
Ralf Habacker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use typedef DBusSocket for sockets fd's to avoid conversion warnings.
Bug:
https://bugs.freedesktop.org/show_bug.cgi?id=89444
parent
ee0e1536
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
96 additions
and
73 deletions
+96
-73
dbus/dbus-connection.h
dbus/dbus-connection.h
+1
-0
dbus/dbus-mainloop.c
dbus/dbus-mainloop.c
+6
-6
dbus/dbus-nonce.c
dbus/dbus-nonce.c
+4
-4
dbus/dbus-nonce.h
dbus/dbus-nonce.h
+3
-2
dbus/dbus-server-debug-pipe.c
dbus/dbus-server-debug-pipe.c
+1
-1
dbus/dbus-server-socket.c
dbus/dbus-server-socket.c
+9
-9
dbus/dbus-server-socket.h
dbus/dbus-server-socket.h
+1
-1
dbus/dbus-server-unix.c
dbus/dbus-server-unix.c
+1
-1
dbus/dbus-spawn-win.c
dbus/dbus-spawn-win.c
+6
-6
dbus/dbus-sysdeps-unix.c
dbus/dbus-sysdeps-unix.c
+5
-5
dbus/dbus-sysdeps-win.c
dbus/dbus-sysdeps-win.c
+23
-23
dbus/dbus-sysdeps.h
dbus/dbus-sysdeps.h
+26
-15
dbus/dbus-watch.c
dbus/dbus-watch.c
+8
-0
dbus/dbus-watch.h
dbus/dbus-watch.h
+2
-0
No files found.
dbus/dbus-connection.h
View file @
f9192688
...
...
@@ -31,6 +31,7 @@
#include <dbus/dbus-memory.h>
#include <dbus/dbus-message.h>
#include <dbus/dbus-shared.h>
#include <dbus/dbus-sysdeps.h>
DBUS_BEGIN_DECLS
...
...
dbus/dbus-mainloop.c
View file @
f9192688
...
...
@@ -270,11 +270,11 @@ dbus_bool_t
_dbus_loop_add_watch
(
DBusLoop
*
loop
,
DBusWatch
*
watch
)
{
in
t
fd
;
DBusSocke
t
fd
;
DBusList
**
watches
;
fd
=
dbus_watch_get_socket
(
watch
);
_dbus_assert
(
fd
!=
-
1
);
fd
=
_
dbus_watch_get_socket
(
watch
);
_dbus_assert
(
fd
!=
DBUS_SOCKET_INVALID
);
watches
=
ensure_watch_table_entry
(
loop
,
fd
);
...
...
@@ -323,13 +323,13 @@ _dbus_loop_remove_watch (DBusLoop *loop,
{
DBusList
**
watches
;
DBusList
*
link
;
in
t
fd
;
DBusSocke
t
fd
;
/* This relies on people removing watches before they invalidate them,
* which has been safe since fd.o #33336 was fixed. Assert about it
* so we don't regress. */
fd
=
dbus_watch_get_socket
(
watch
);
_dbus_assert
(
fd
!=
-
1
);
fd
=
_
dbus_watch_get_socket
(
watch
);
_dbus_assert
(
fd
!=
DBUS_SOCKET_INVALID
);
watches
=
_dbus_hash_table_lookup_int
(
loop
->
watches
,
fd
);
...
...
dbus/dbus-nonce.c
View file @
f9192688
...
...
@@ -142,10 +142,10 @@ _dbus_read_nonce (const DBusString *fname, DBusString *nonce, DBusError* error)
return
TRUE
;
}
in
t
_dbus_accept_with_noncefile
(
in
t
listen_fd
,
const
DBusNonceFile
*
noncefile
)
DBusSocke
t
_dbus_accept_with_noncefile
(
DBusSocke
t
listen_fd
,
const
DBusNonceFile
*
noncefile
)
{
in
t
fd
;
DBusSocke
t
fd
;
DBusString
nonce
;
_dbus_assert
(
noncefile
!=
NULL
);
...
...
@@ -431,7 +431,7 @@ _dbus_noncefile_get_path (const DBusNonceFile *noncefile)
* and matches the nonce from the given nonce file
*/
dbus_bool_t
_dbus_noncefile_check_nonce
(
in
t
fd
,
_dbus_noncefile_check_nonce
(
DBusSocke
t
fd
,
const
DBusNonceFile
*
noncefile
,
DBusError
*
error
)
{
...
...
dbus/dbus-nonce.h
View file @
f9192688
...
...
@@ -27,6 +27,7 @@
#include <dbus/dbus-types.h>
#include <dbus/dbus-errors.h>
#include <dbus/dbus-string.h>
#include <dbus/dbus-sysdeps.h>
DBUS_BEGIN_DECLS
...
...
@@ -46,13 +47,13 @@ dbus_bool_t _dbus_noncefile_create (DBusNonceFile *noncefile,
dbus_bool_t
_dbus_noncefile_delete
(
DBusNonceFile
*
noncefile
,
DBusError
*
error
);
dbus_bool_t
_dbus_noncefile_check_nonce
(
in
t
fd
,
dbus_bool_t
_dbus_noncefile_check_nonce
(
DBusSocke
t
fd
,
const
DBusNonceFile
*
noncefile
,
DBusError
*
error
);
const
DBusString
*
_dbus_noncefile_get_path
(
const
DBusNonceFile
*
noncefile
);
in
t
_dbus_accept_with_noncefile
(
in
t
listen_fd
,
DBusSocke
t
_dbus_accept_with_noncefile
(
DBusSocke
t
listen_fd
,
const
DBusNonceFile
*
noncefile
);
// shared
...
...
dbus/dbus-server-debug-pipe.c
View file @
f9192688
...
...
@@ -211,7 +211,7 @@ _dbus_transport_debug_pipe_new (const char *server_name,
DBusTransport
*
client_transport
;
DBusTransport
*
server_transport
;
DBusConnection
*
connection
;
in
t
client_fd
,
server_fd
;
DBusSocke
t
client_fd
,
server_fd
;
DBusServer
*
server
;
DBusString
address
;
...
...
dbus/dbus-server-socket.c
View file @
f9192688
...
...
@@ -51,7 +51,7 @@ struct DBusServerSocket
{
DBusServer
base
;
/**< Parent class members. */
int
n_fds
;
/**< Number of active file handles */
int
*
fds
;
/**< File descriptor or
-1
if disconnected. */
DBusSocket
*
fds
;
/**< File descriptor or
DBUS_SOCKET_INVALID
if disconnected. */
DBusWatch
**
watch
;
/**< File descriptor watch. */
char
*
socket_name
;
/**< Name of domain socket, to unlink if appropriate */
DBusNonceFile
*
noncefile
;
/**< Nonce file used to authenticate clients */
...
...
@@ -182,11 +182,11 @@ socket_handle_watch (DBusWatch *watch,
if
(
flags
&
DBUS_WATCH_READABLE
)
{
in
t
client_fd
;
in
t
listen_fd
;
DBusSocke
t
client_fd
;
DBusSocke
t
listen_fd
;
int
saved_errno
;
listen_fd
=
dbus_watch_get_socket
(
watch
);
listen_fd
=
_
dbus_watch_get_socket
(
watch
);
if
(
socket_server
->
noncefile
)
client_fd
=
_dbus_accept_with_noncefile
(
listen_fd
,
socket_server
->
noncefile
);
...
...
@@ -195,7 +195,7 @@ socket_handle_watch (DBusWatch *watch,
saved_errno
=
_dbus_save_socket_errno
();
if
(
client_fd
<
0
)
if
(
client_fd
==
DBUS_SOCKET_INVALID
)
{
/* EINTR handled for us */
...
...
@@ -243,7 +243,7 @@ socket_disconnect (DBusServer *server)
}
_dbus_close_socket
(
socket_server
->
fds
[
i
],
NULL
);
socket_server
->
fds
[
i
]
=
-
1
;
socket_server
->
fds
[
i
]
=
DBUS_SOCKET_INVALID
;
}
if
(
socket_server
->
socket_name
!=
NULL
)
...
...
@@ -280,7 +280,7 @@ static const DBusServerVTable socket_vtable = {
*
*/
DBusServer
*
_dbus_server_new_for_socket
(
int
*
fds
,
_dbus_server_new_for_socket
(
DBusSocket
*
fds
,
int
n_fds
,
const
DBusString
*
address
,
DBusNonceFile
*
noncefile
)
...
...
@@ -295,7 +295,7 @@ _dbus_server_new_for_socket (int *fds,
socket_server
->
noncefile
=
noncefile
;
socket_server
->
fds
=
dbus_new
(
in
t
,
n_fds
);
socket_server
->
fds
=
dbus_new
(
DBusSocke
t
,
n_fds
);
if
(
!
socket_server
->
fds
)
goto
failed_0
;
...
...
@@ -396,7 +396,7 @@ _dbus_server_new_for_tcp_socket (const char *host,
dbus_bool_t
use_nonce
)
{
DBusServer
*
server
;
in
t
*
listen_fds
=
NULL
;
DBusSocke
t
*
listen_fds
=
NULL
;
int
nlisten_fds
=
0
,
i
;
DBusString
address
;
DBusString
host_str
;
...
...
dbus/dbus-server-socket.h
View file @
f9192688
...
...
@@ -29,7 +29,7 @@
DBUS_BEGIN_DECLS
DBusServer
*
_dbus_server_new_for_socket
(
int
*
fds
,
DBusServer
*
_dbus_server_new_for_socket
(
DBusSocket
*
fds
,
int
n_fds
,
const
DBusString
*
address
,
DBusNonceFile
*
noncefile
);
...
...
dbus/dbus-server-unix.c
View file @
f9192688
...
...
@@ -289,7 +289,7 @@ _dbus_server_new_for_domain_socket (const char *path,
DBusError
*
error
)
{
DBusServer
*
server
;
in
t
listen_fd
;
DBusSocke
t
listen_fd
;
DBusString
address
;
char
*
path_copy
;
DBusString
path_str
;
...
...
dbus/dbus-spawn-win.c
View file @
f9192688
...
...
@@ -77,8 +77,8 @@ struct DBusBabysitter
char
**
envp
;
HANDLE
child_handle
;
in
t
socket_to_babysitter
;
/* Connection to the babysitter thread */
in
t
socket_to_main
;
DBusSocke
t
socket_to_babysitter
;
/* Connection to the babysitter thread */
DBusSocke
t
socket_to_main
;
DBusWatchList
*
watches
;
DBusWatch
*
sitter_watch
;
...
...
@@ -171,10 +171,10 @@ close_socket_to_babysitter (DBusBabysitter *sitter)
sitter
->
sitter_watch
=
NULL
;
}
if
(
sitter
->
socket_to_babysitter
!=
-
1
)
if
(
sitter
->
socket_to_babysitter
!=
DBUS_SOCKET_INVALID
)
{
_dbus_close_socket
(
sitter
->
socket_to_babysitter
,
NULL
);
sitter
->
socket_to_babysitter
=
-
1
;
sitter
->
socket_to_babysitter
=
DBUS_SOCKET_INVALID
;
}
}
...
...
@@ -198,10 +198,10 @@ _dbus_babysitter_unref (DBusBabysitter *sitter)
{
close_socket_to_babysitter
(
sitter
);
if
(
sitter
->
socket_to_main
!=
-
1
)
if
(
sitter
->
socket_to_main
!=
DBUS_SOCKET_INVALID
)
{
_dbus_close_socket
(
sitter
->
socket_to_main
,
NULL
);
sitter
->
socket_to_main
=
-
1
;
sitter
->
socket_to_main
=
DBUS_SOCKET_INVALID
;
}
PING
();
...
...
dbus/dbus-sysdeps-unix.c
View file @
f9192688
...
...
@@ -274,7 +274,7 @@ _dbus_write_socket (int fd,
* @returns number of bytes appended to string
*/
int
_dbus_read_socket_with_unix_fds
(
int
fd
,
_dbus_read_socket_with_unix_fds
(
DBusSocket
fd
,
DBusString
*
buffer
,
int
count
,
int
*
fds
,
...
...
@@ -1807,7 +1807,7 @@ out:
* @returns #TRUE on success
*/
dbus_bool_t
_dbus_read_credentials_socket
(
int
client_fd
,
_dbus_read_credentials_socket
(
DBusSocket
client_fd
,
DBusCredentials
*
credentials
,
DBusError
*
error
)
{
...
...
@@ -3287,13 +3287,13 @@ _dbus_print_backtrace (void)
* @returns #FALSE on failure (if error is set)
*/
dbus_bool_t
_dbus_socketpair
(
int
*
fd1
,
int
*
fd2
,
_dbus_socketpair
(
DBusSocket
*
fd1
,
DBusSocket
*
fd2
,
dbus_bool_t
blocking
,
DBusError
*
error
)
{
#ifdef HAVE_SOCKETPAIR
in
t
fds
[
2
];
DBusSocke
t
fds
[
2
];
int
retval
;
#ifdef SOCK_CLOEXEC
...
...
dbus/dbus-sysdeps-win.c
View file @
f9192688
...
...
@@ -52,7 +52,6 @@
#include "dbus-credentials.h"
#include <windows.h>
#include <ws2tcpip.h>
#include <wincrypt.h>
#include <iphlpapi.h>
...
...
@@ -376,7 +375,7 @@ _dbus_win_free_error_string (char *string)
*/
int
_dbus_read_socket
(
int
fd
,
_dbus_read_socket
(
DBusSocket
fd
,
DBusString
*
buffer
,
int
count
)
{
...
...
@@ -446,7 +445,7 @@ _dbus_read_socket (int fd,
* @returns the number of bytes written or -1 on error
*/
int
_dbus_write_socket
(
int
fd
,
_dbus_write_socket
(
DBusSocket
fd
,
const
DBusString
*
buffer
,
int
start
,
int
len
)
...
...
@@ -490,7 +489,7 @@ _dbus_write_socket (int fd,
* @returns #FALSE if error set
*/
dbus_bool_t
_dbus_close_socket
(
int
fd
,
_dbus_close_socket
(
DBusSocket
fd
,
DBusError
*
error
)
{
_DBUS_ASSERT_ERROR_IS_CLEAR
(
error
);
...
...
@@ -580,7 +579,7 @@ _dbus_set_fd_nonblocking (int handle,
* @returns total bytes written from both buffers, or -1 on error
*/
int
_dbus_write_socket_two
(
int
fd
,
_dbus_write_socket_two
(
DBusSocket
fd
,
const
DBusString
*
buffer1
,
int
start1
,
int
len1
,
...
...
@@ -644,9 +643,9 @@ _dbus_write_socket_two (int fd,
}
dbus_bool_t
_dbus_socket_is_invalid
(
in
t
fd
)
_dbus_socket_is_invalid
(
DBusSocke
t
fd
)
{
return
fd
==
INVALID
_SOCKET
?
TRUE
:
FALSE
;
return
fd
==
DBUS_SOCKET_
INVALID
?
TRUE
:
FALSE
;
}
#if 0
...
...
@@ -1074,7 +1073,7 @@ _dbus_socketpair (int *fd1,
}
temp
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
temp
==
INVALID
_SOCKET
)
if
(
temp
==
DBUS_SOCKET_
INVALID
)
{
DBUS_SOCKET_SET_ERRNO
();
goto
out0
;
...
...
@@ -1105,7 +1104,7 @@ _dbus_socketpair (int *fd1,
}
socket1
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
socket1
==
INVALID
_SOCKET
)
if
(
socket1
==
DBUS_SOCKET_
INVALID
)
{
DBUS_SOCKET_SET_ERRNO
();
goto
out0
;
...
...
@@ -1118,7 +1117,7 @@ _dbus_socketpair (int *fd1,
}
socket2
=
accept
(
temp
,
(
struct
sockaddr
*
)
&
saddr
,
&
len
);
if
(
socket2
==
INVALID
_SOCKET
)
if
(
socket2
==
DBUS_SOCKET_
INVALID
)
{
DBUS_SOCKET_SET_ERRNO
();
goto
out1
;
...
...
@@ -1509,7 +1508,7 @@ _dbus_connect_tcp_socket_with_nonce (const char *host,
const
char
*
noncefile
,
DBusError
*
error
)
{
int
fd
=
-
1
,
res
;
SOCKET
fd
=
DBUS_SOCKET_INVALID
,
res
;
struct
addrinfo
hints
;
struct
addrinfo
*
ai
,
*
tmp
;
...
...
@@ -1556,7 +1555,7 @@ _dbus_connect_tcp_socket_with_nonce (const char *host,
tmp
=
ai
;
while
(
tmp
)
{
if
((
fd
=
socket
(
tmp
->
ai_family
,
SOCK_STREAM
,
0
))
==
INVALID
_SOCKET
)
if
((
fd
=
socket
(
tmp
->
ai_family
,
SOCK_STREAM
,
0
))
==
DBUS_SOCKET_
INVALID
)
{
DBUS_SOCKET_SET_ERRNO
();
dbus_set_error
(
error
,
...
...
@@ -1581,7 +1580,7 @@ _dbus_connect_tcp_socket_with_nonce (const char *host,
}
freeaddrinfo
(
ai
);
if
(
fd
==
-
1
)
if
(
fd
==
DBUS_SOCKET_INVALID
)
{
dbus_set_error
(
error
,
_dbus_error_from_errno
(
errno
),
...
...
@@ -1645,10 +1644,11 @@ _dbus_listen_tcp_socket (const char *host,
const
char
*
port
,
const
char
*
family
,
DBusString
*
retport
,
int
**
fds_p
,
DBusSocket
**
fds_p
,
DBusError
*
error
)
{
int
nlisten_fd
=
0
,
*
listen_fd
=
NULL
,
res
,
i
,
port_num
=
-
1
;
DBusSocket
*
listen_fd
=
NULL
;
int
nlisten_fd
=
0
,
res
,
i
,
port_num
=
-
1
;
struct
addrinfo
hints
;
struct
addrinfo
*
ai
,
*
tmp
;
...
...
@@ -1708,8 +1708,8 @@ _dbus_listen_tcp_socket (const char *host,
tmp
=
ai
;
while
(
tmp
)
{
int
fd
=
-
1
,
*
newlisten_fd
;
if
((
fd
=
socket
(
tmp
->
ai_family
,
SOCK_STREAM
,
0
))
==
INVALID
_SOCKET
)
DBusSocket
fd
=
DBUS_SOCKET_INVALID
,
*
newlisten_fd
;
if
((
fd
=
socket
(
tmp
->
ai_family
,
SOCK_STREAM
,
0
))
==
DBUS_SOCKET_
INVALID
)
{
DBUS_SOCKET_SET_ERRNO
();
dbus_set_error
(
error
,
...
...
@@ -1851,10 +1851,10 @@ _dbus_listen_tcp_socket (const char *host,
* @param listen_fd the listen file descriptor
* @returns the connection fd of the client, or -1 on error
*/
in
t
_dbus_accept
(
in
t
listen_fd
)
DBusSocke
t
_dbus_accept
(
DBusSocke
t
listen_fd
)
{
in
t
client_fd
;
DBusSocke
t
client_fd
;
retry:
client_fd
=
accept
(
listen_fd
,
NULL
,
NULL
);
...
...
@@ -1875,8 +1875,8 @@ _dbus_accept (int listen_fd)
dbus_bool_t
_dbus_send_credentials_socket
(
int
handle
,
DBusError
*
error
)
_dbus_send_credentials_socket
(
DBusSocket
handle
,
DBusError
*
error
)
{
/* FIXME: for the session bus credentials shouldn't matter (?), but
* for the system bus they are presumably essential. A rough outline
...
...
@@ -1952,7 +1952,7 @@ again:
* @returns #TRUE on success
*/
dbus_bool_t
_dbus_read_credentials_socket
(
int
handle
,
_dbus_read_credentials_socket
(
DBusSocket
handle
,
DBusCredentials
*
credentials
,
DBusError
*
error
)
{
...
...
dbus/dbus-sysdeps.h
View file @
f9192688
...
...
@@ -62,6 +62,10 @@
#include "dbus-sysdeps-wince-glue.h"
#endif
#ifdef DBUS_WIN
#include <ws2tcpip.h>
#endif
DBUS_BEGIN_DECLS
#ifdef DBUS_WIN
...
...
@@ -128,20 +132,27 @@ typedef unsigned long dbus_gid_t;
* will be checked by the compiler.
*
*/
#ifndef DBUS_WIN
typedef
int
DBusSocket
;
# define DBUS_SOCKET_INVALID -1
#else
typedef
SOCKET
DBusSocket
;
# define DBUS_SOCKET_INVALID INVALID_SOCKET
#endif
DBUS_PRIVATE_EXPORT
dbus_bool_t
_dbus_close_socket
(
int
fd
,
dbus_bool_t
_dbus_close_socket
(
DBusSocket
fd
,
DBusError
*
error
);
DBUS_PRIVATE_EXPORT
int
_dbus_read_socket
(
int
fd
,
int
_dbus_read_socket
(
DBusSocket
fd
,
DBusString
*
buffer
,
int
count
);
DBUS_PRIVATE_EXPORT
int
_dbus_write_socket
(
int
fd
,
int
_dbus_write_socket
(
DBusSocket
fd
,
const
DBusString
*
buffer
,
int
start
,
int
len
);
int
_dbus_write_socket_two
(
int
fd
,
int
_dbus_write_socket_two
(
DBusSocket
fd
,
const
DBusString
*
buffer1
,
int
start1
,
int
len1
,
...
...
@@ -149,19 +160,19 @@ int _dbus_write_socket_two (int fd,
int
start2
,
int
len2
);
int
_dbus_read_socket_with_unix_fds
(
int
fd
,
int
_dbus_read_socket_with_unix_fds
(
DBusSocket
fd
,
DBusString
*
buffer
,
int
count
,
int
*
fds
,
int
*
n_fds
);
DBUS_PRIVATE_EXPORT
int
_dbus_write_socket_with_unix_fds
(
int
fd
,
int
_dbus_write_socket_with_unix_fds
(
DBusSocket
fd
,
const
DBusString
*
buffer
,
int
start
,
int
len
,
const
int
*
fds
,
int
n_fds
);
int
_dbus_write_socket_with_unix_fds_two
(
int
fd
,
int
_dbus_write_socket_with_unix_fds_two
(
DBusSocket
fd
,
const
DBusString
*
buffer1
,
int
start1
,
int
len1
,
...
...
@@ -171,7 +182,7 @@ int _dbus_write_socket_with_unix_fds_two (int fd,
const
int
*
fds
,
int
n_fds
);
dbus_bool_t
_dbus_socket_is_invalid
(
int
fd
);
dbus_bool_t
_dbus_socket_is_invalid
(
DBusSocket
fd
);
int
_dbus_connect_tcp_socket
(
const
char
*
host
,
const
char
*
port
,
...
...
@@ -186,15 +197,15 @@ int _dbus_listen_tcp_socket (const char *host,
const
char
*
port
,
const
char
*
family
,
DBusString
*
retport
,
int
**
fds_p
,
DBusSocket
**
fds_p
,
DBusError
*
error
);
in
t
_dbus_accept
(
int
listen_fd
);
DBusSocke
t
_dbus_accept
(
DBusSocket
listen_fd
);
dbus_bool_t
_dbus_read_credentials_socket
(
int
client_fd
,
dbus_bool_t
_dbus_read_credentials_socket
(
DBusSocket
client_fd
,
DBusCredentials
*
credentials
,
DBusError
*
error
);
dbus_bool_t
_dbus_send_credentials_socket
(
int
server_fd
,
dbus_bool_t
_dbus_send_credentials_socket
(
DBusSocket
server_fd
,
DBusError
*
error
);
dbus_bool_t
_dbus_credentials_add_from_user
(
DBusCredentials
*
credentials
,
...
...
@@ -224,7 +235,7 @@ dbus_bool_t _dbus_daemon_publish_session_bus_address (const char* address, const
void
_dbus_daemon_unpublish_session_bus_address
(
void
);
dbus_bool_t
_dbus_socket_can_pass_unix_fd
(
in
t
fd
);
dbus_bool_t
_dbus_socket_can_pass_unix_fd
(
DBusSocke
t
fd
);
/** Opaque type representing an atomically-modifiable integer
* that can be used from multiple threads.
...
...
@@ -438,8 +449,8 @@ dbus_bool_t _dbus_stat (const DBusString *filename,
DBusStat
*
statbuf
,
DBusError
*
error
);
DBUS_PRIVATE_EXPORT
dbus_bool_t
_dbus_socketpair
(
int
*
fd1
,
int
*
fd2
,
dbus_bool_t
_dbus_socketpair
(
DBusSocket
*
fd1
,
DBusSocket
*
fd2
,
dbus_bool_t
blocking
,
DBusError
*
error
);
...
...
dbus/dbus-watch.c
View file @
f9192688
...
...
@@ -590,6 +590,14 @@ dbus_watch_get_socket (DBusWatch *watch)
return
watch
->
fd
;
}
DBusSocket
_dbus_watch_get_socket
(
DBusWatch
*
watch
)
{
_dbus_return_val_if_fail
(
watch
!=
NULL
,
-
1
);
return
watch
->
fd
;
}
/**
* Gets flags from DBusWatchFlags indicating
* what conditions should be monitored on the
...
...
dbus/dbus-watch.h
View file @
f9192688
...
...
@@ -94,6 +94,8 @@ dbus_bool_t _dbus_watch_get_oom_last_time (DBusWatch *watch);
DBUS_PRIVATE_EXPORT
void
_dbus_watch_set_oom_last_time
(
DBusWatch
*
watch
,
dbus_bool_t
oom
);
DBUS_PRIVATE_EXPORT
DBusSocket
_dbus_watch_get_socket
(
DBusWatch
*
watch
);
/** @} */
...
...
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