From b8707600fd45e0cda31654fc7b2932f29b28d1a1 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Wed, 28 Apr 2004 12:44:32 +0000 Subject: Unify copyright and license information --- test/attest.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) (limited to 'test/attest.c') diff --git a/test/attest.c b/test/attest.c index 078bb886..f4732cb6 100644 --- a/test/attest.c +++ b/test/attest.c @@ -1,26 +1,35 @@ /* * - * Programm for testing AT commands over Bluetooth RFCOMM + * BlueZ - Bluetooth protocol stack for Linux * - * Copyright (C) 2001-2002 Marcel Holtmann + * Copyright (C) 2001-2004 Marcel Holtmann * * * 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. + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; * - * 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. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY + * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, + * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS + * SOFTWARE IS DISCLAIMED. * + * + * $Id$ */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -35,8 +44,6 @@ #include #include - - static int at_command(int fd, char *cmd, int to) { fd_set rfds; @@ -76,7 +83,6 @@ static int at_command(int fd, char *cmd, int to) return 0; } - static int open_device(char *device) { int fd; @@ -96,7 +102,6 @@ static int open_device(char *device) return fd; } - static int open_socket(bdaddr_t *bdaddr, uint8_t channel) { struct sockaddr_rc remote_addr, local_addr; @@ -105,7 +110,7 @@ static int open_socket(bdaddr_t *bdaddr, uint8_t channel) if ((s = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)) < 0) { printf("Can't create socket. %s (%d)\n", strerror(errno), errno); return -1; - } + } memset(&local_addr, 0, sizeof(local_addr)); local_addr.rc_family = AF_BLUETOOTH; @@ -129,13 +134,11 @@ static int open_socket(bdaddr_t *bdaddr, uint8_t channel) return s; } - static void usage(void) { printf("Usage:\n\tattest | [channel]\n"); } - int main(int argc, char *argv[]) { int fd; -- cgit v1.2.3