~ubuntu-branches/ubuntu/wily/squeezelite/wily

« back to all changes in this revision

Viewing changes to stream.c

  • Committer: Package Import Robot
  • Author(s): Chris Boot
  • Date: 2015-05-12 19:56:54 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20150512195654-z4pb7qxxp0vo4r85
Tags: 1.8-1
* New upstream release.
  - Refresh patches for Makefile changes.
  - Should fix a crash when resampling. (Closes: #774524)
* Tweak debian/copyright based on debmake -k's suggestions.
* Enable LIRC support.
* Bump standards version to 3.8.6 (no changes required).
* Update debian/man/squeezelite.1 to document new features/options added
  since 1.6.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
2
 *  Squeezelite - lightweight headless squeezebox emulator
3
3
 *
4
 
 *  (c) Adrian Smith 2012-2014, triode1@btinternet.com
 
4
 *  (c) Adrian Smith 2012-2015, triode1@btinternet.com
5
5
 *  
6
6
 * This program is free software: you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
367
367
}
368
368
 
369
369
void stream_sock(u32_t ip, u16_t port, const char *header, size_t header_len, unsigned threshold, bool cont_wait) {
370
 
    struct sockaddr_in addr;
 
370
        struct sockaddr_in addr;
371
371
 
372
372
        int sock = socket(AF_INET, SOCK_STREAM, 0);
373
373
 
386
386
        set_nonblock(sock);
387
387
        set_nosigpipe(sock);
388
388
 
389
 
    if (connect_timeout(sock, (struct sockaddr *) &addr, sizeof(addr), 10) < 0) {
 
389
        if (connect_timeout(sock, (struct sockaddr *) &addr, sizeof(addr), 10) < 0) {
390
390
                LOG_INFO("unable to connect to server");
391
391
                LOCK;
392
392
                stream.state = DISCONNECT;