~ubuntu-branches/ubuntu/wily/bluez/wily

« back to all changes in this revision

Viewing changes to src/sdpd-server.c

ImportĀ upstreamĀ versionĀ 4.81

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *
5
5
 *  Copyright (C) 2001-2002  Nokia Corporation
6
6
 *  Copyright (C) 2002-2003  Maxim Krasnyansky <maxk@qualcomm.com>
7
 
 *  Copyright (C) 2002-2009  Marcel Holtmann <marcel@holtmann.org>
 
7
 *  Copyright (C) 2002-2010  Marcel Holtmann <marcel@holtmann.org>
8
8
 *  Copyright (C) 2002-2003  Stephen Crane <steve.crane@rococosoft.com>
9
9
 *
10
10
 *
45
45
 
46
46
#include <glib.h>
47
47
 
48
 
#include "logging.h"
 
48
#include "log.h"
49
49
#include "sdpd.h"
50
50
 
51
51
static GIOChannel *l2cap_io = NULL, *unix_io = NULL;
113
113
                }
114
114
        }
115
115
 
116
 
        listen(l2cap_sock, 5);
 
116
        if (listen(l2cap_sock, 5) < 0) {
 
117
                error("listen: %s", strerror(errno));
 
118
                return -1;
 
119
        }
117
120
 
118
121
        if (!compat) {
119
122
                unix_sock = -1;
138
141
                return -1;
139
142
        }
140
143
 
141
 
        listen(unix_sock, 5);
 
144
        if (listen(unix_sock, 5) < 0) {
 
145
                error("listen UNIX socket: %s", strerror(errno));
 
146
                return -1;
 
147
        }
142
148
 
143
149
        chmod(SDP_UNIX_PATH, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
144
150