diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-04-28 12:44:32 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-04-28 12:44:32 +0000 |
commit | b8707600fd45e0cda31654fc7b2932f29b28d1a1 (patch) | |
tree | 8fbdf8c57083fef894347a7b69135baeb269e213 /test/hstest.c | |
parent | 1c78dbe58cb701c7a0463b3bafadadb3d08461f1 (diff) |
Unify copyright and license information
Diffstat (limited to 'test/hstest.c')
-rw-r--r-- | test/hstest.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/test/hstest.c b/test/hstest.c index 23bbf089..1272cd01 100644 --- a/test/hstest.c +++ b/test/hstest.c @@ -1,25 +1,35 @@ /* * - * Bluetooth Headset Test utility + * BlueZ - Bluetooth protocol stack for Linux * - * Copyright (C) 2002 Marcel Holtmann <marcel@holtmann.org> + * Copyright (C) 2002-2004 Marcel Holtmann <marcel@holtmann.org> * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * - * Software distributed under the License is distributed on an "AS - * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - * implied. See the License for the specific language governing - * rights and limitations under the License. + * 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 <config.h> +#endif + #include <stdio.h> #include <errno.h> #include <fcntl.h> @@ -38,14 +48,12 @@ #include <bluetooth/sco.h> #include <bluetooth/rfcomm.h> - static volatile int terminate = 0; static void sig_term(int sig) { terminate = 1; } - static int rfcomm_connect(bdaddr_t *src, bdaddr_t *dst, uint8_t channel) { struct sockaddr_rc addr; @@ -124,7 +132,6 @@ static int sco_connect(bdaddr_t *src, bdaddr_t *dst, uint16_t *handle, uint16_t return s; } - static void usage(void) { printf("Usage:\n" @@ -154,7 +161,6 @@ int main(int argc, char *argv[]) int dd, rd, sd, fd; uint16_t sco_handle, sco_mtu, vs; - switch (argc) { case 4: str2ba(argv[3], &bdaddr); @@ -182,7 +188,6 @@ int main(int argc, char *argv[]) filename = argv[2]; - hci_devba(0, &local); dd = hci_open_dev(0); hci_read_voice_setting(dd, &vs, 1000); @@ -194,7 +199,6 @@ int main(int argc, char *argv[]) return -1; } - if (strcmp(filename, "-") == 0) { switch (mode) { case PLAY: @@ -213,7 +217,6 @@ int main(int argc, char *argv[]) } } - memset(&sa, 0, sizeof(sa)); sa.sa_flags = SA_NOCLDSTOP; sa.sa_handler = sig_term; @@ -224,7 +227,6 @@ int main(int argc, char *argv[]) sigaction(SIGCHLD, &sa, NULL); sigaction(SIGPIPE, &sa, NULL); - if ((rd = rfcomm_connect(&local, &bdaddr, channel)) < 0) { perror("Can't connect RFCOMM channel"); return -1; @@ -232,7 +234,6 @@ int main(int argc, char *argv[]) fprintf(stderr, "RFCOMM channel connected\n"); - if ((sd = sco_connect(&local, &bdaddr, &sco_handle, &sco_mtu)) < 0) { perror("Can't connect SCO audio channel"); close(rd); @@ -240,7 +241,6 @@ int main(int argc, char *argv[]) } fprintf(stderr, "SCO audio channel connected (handle %d, mtu %d)\n", sco_handle, sco_mtu); - if (mode == RECORD) write(rd, "RING\r\n", 6); |