summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-12-04 09:11:37 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-12-04 09:11:46 -0500
commit4e8dfda88093f3648bdbc0e6c292ec41fadc6d55 (patch)
tree5d4d381dc493a119342768d85fa3b39756a8b20b
parent5f9e81b105e84988a92c1f448fa46d9054893b55 (diff)
clean up whitespace
-rw-r--r--libs/pbd/crossthread.cc24
-rw-r--r--libs/pbd/crossthread.win.cc65
2 files changed, 44 insertions, 45 deletions
diff --git a/libs/pbd/crossthread.cc b/libs/pbd/crossthread.cc
index 1e5b9e29e4..3792e19471 100644
--- a/libs/pbd/crossthread.cc
+++ b/libs/pbd/crossthread.cc
@@ -1,19 +1,19 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
diff --git a/libs/pbd/crossthread.win.cc b/libs/pbd/crossthread.win.cc
index 7f4967fe0a..32f52fc12c 100644
--- a/libs/pbd/crossthread.win.cc
+++ b/libs/pbd/crossthread.win.cc
@@ -1,19 +1,19 @@
/*
- Copyright (C) 2009 Paul Davis
+ Copyright (C) 2009 Paul Davis
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
@@ -27,25 +27,24 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
{
WSADATA wsaData;
- if(WSAStartup(MAKEWORD(1,1),&wsaData) != 0)
- {
+ if(WSAStartup(MAKEWORD(1,1),&wsaData) != 0) {
std::cerr << "CrossThreadChannel::CrossThreadChannel() Winsock initialization failed with error: " << WSAGetLastError() << std::endl;
- return;
- }
+ return;
+ }
struct sockaddr_in send_address;
// Create Send Socket
- send_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- send_address.sin_family = AF_INET;
- send_address.sin_addr.s_addr = inet_addr("127.0.0.1");
- send_address.sin_port = htons(0);
- int status = bind(send_socket, (SOCKADDR*)&send_address,
- sizeof(send_address));
+ send_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ send_address.sin_family = AF_INET;
+ send_address.sin_addr.s_addr = inet_addr("127.0.0.1");
+ send_address.sin_port = htons(0);
+ int status = bind(send_socket, (SOCKADDR*)&send_address,
+ sizeof(send_address));
if (status != 0) {
std::cerr << "CrossThreadChannel::CrossThreadChannel() Send socket binding failed with error: " << WSAGetLastError() << std::endl;
- return;
+ return;
}
// make the socket non-blockable if required
@@ -58,27 +57,27 @@ CrossThreadChannel::CrossThreadChannel (bool non_blocking)
}
// Create Receive Socket, this socket will be set to unblockable mode by IO channel
- receive_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
- recv_address.sin_family = AF_INET;
- recv_address.sin_addr.s_addr = inet_addr("127.0.0.1");
- recv_address.sin_port = htons(0);
- status = bind(receive_socket, (SOCKADDR*)&recv_address,
- sizeof(recv_address));
+ receive_socket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+ recv_address.sin_family = AF_INET;
+ recv_address.sin_addr.s_addr = inet_addr("127.0.0.1");
+ recv_address.sin_port = htons(0);
+ status = bind(receive_socket, (SOCKADDR*)&recv_address,
+ sizeof(recv_address));
if (status != 0) {
std::cerr << "CrossThreadChannel::CrossThreadChannel() Receive socket binding failed with error: " << WSAGetLastError() << std::endl;
- return;
+ return;
}
// recieve socket will be made non-blocking by GSource which will use it
// get assigned port number for Receive Socket
int recv_addr_len = sizeof(recv_address);
- status = getsockname(receive_socket, (SOCKADDR*)&recv_address, &recv_addr_len);
+ status = getsockname(receive_socket, (SOCKADDR*)&recv_address, &recv_addr_len);
if (status != 0) {
std::cerr << "CrossThreadChannel::CrossThreadChannel() Setting receive socket address to local failed with error: " << WSAGetLastError() << std::endl;
- return;
+ return;
}
// construct IOChannel
@@ -101,7 +100,7 @@ CrossThreadChannel::~CrossThreadChannel ()
if (receive_channel) {
g_io_channel_unref (receive_channel);
- }
+ }
closesocket(send_socket);
closesocket(receive_socket);