[Spice-commits] server/main-channel.c server/main-channel.h server/reds.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Wed Nov 30 14:13:46 UTC 2016
server/main-channel.c | 12 ------------
server/main-channel.h | 2 --
server/reds.c | 12 ++++--------
3 files changed, 4 insertions(+), 22 deletions(-)
New commits:
commit 4eed0bf8ecd48cd253ae976458c7db387c7ea27e
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Fri Nov 18 05:38:25 2016 +0000
Return invalid value from very old obsolete functions
These functions are not used since years and are not supporting
multiple clients.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Pavel Grunt <pgrunt at redhat.com>
diff --git a/server/main-channel.c b/server/main-channel.c
index 6449c16..a155419 100644
--- a/server/main-channel.c
+++ b/server/main-channel.c
@@ -306,18 +306,6 @@ MainChannelClient *main_channel_link(MainChannel *channel, RedClient *client,
return mcc;
}
-int main_channel_getsockname(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen)
-{
- return main_chan ?
- getsockname(red_channel_get_first_socket(RED_CHANNEL(main_chan)), sa, salen) : -1;
-}
-
-int main_channel_getpeername(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen)
-{
- return main_chan ?
- getpeername(red_channel_get_first_socket(RED_CHANNEL(main_chan)), sa, salen) : -1;
-}
-
// TODO: ? shouldn't it disconnect all clients? or shutdown all main_channels?
void main_channel_close(MainChannel *main_chan)
{
diff --git a/server/main-channel.h b/server/main-channel.h
index 19beb7c..019cf99 100644
--- a/server/main-channel.h
+++ b/server/main-channel.h
@@ -66,8 +66,6 @@ void main_channel_push_mouse_mode(MainChannel *main_chan, int current_mode, int
void main_channel_push_agent_connected(MainChannel *main_chan);
void main_channel_push_agent_disconnected(MainChannel *main_chan);
void main_channel_push_multi_media_time(MainChannel *main_chan, int time);
-int main_channel_getsockname(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen);
-int main_channel_getpeername(MainChannel *main_chan, struct sockaddr *sa, socklen_t *salen);
int main_channel_is_connected(MainChannel *main_chan);
diff --git a/server/reds.c b/server/reds.c
index f88c5f2..eb99960 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -3848,20 +3848,16 @@ SPICE_GNUC_VISIBLE int spice_server_set_channel_security(SpiceServer *s, const c
return -1;
}
+/* very obsolete and old function, retain only for ABI */
SPICE_GNUC_VISIBLE int spice_server_get_sock_info(SpiceServer *reds, struct sockaddr *sa, socklen_t *salen)
{
- if (main_channel_getsockname(reds->main_channel, sa, salen) < 0) {
- return -1;
- }
- return 0;
+ return -1;
}
+/* very obsolete and old function, retain only for ABI */
SPICE_GNUC_VISIBLE int spice_server_get_peer_info(SpiceServer *reds, struct sockaddr *sa, socklen_t *salen)
{
- if (main_channel_getpeername(reds->main_channel, sa, salen) < 0) {
- return -1;
- }
- return 0;
+ return -1;
}
SPICE_GNUC_VISIBLE int spice_server_is_server_mouse(SpiceServer *reds)
More information about the Spice-commits
mailing list