~ubuntu-branches/ubuntu/saucy/bluez/saucy

« back to all changes in this revision

Viewing changes to src/sdpd-server.c

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-07-04 13:28:49 UTC
  • mfrom: (1.1.38)
  • Revision ID: package-import@ubuntu.com-20120704132849-tmwu1x7p2vxcclt1
Tags: 4.101-0ubuntu1
* New upstream release
* debian/libbluetooth3.symbols:
  - Updated
* debian/patches/10-unregister_interface_on_exit.patch:
* debian/patches/11-explicitly_close.patch:
* debian/patches/python3.patch:
  - Applied upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
#include <glib.h>
47
47
 
 
48
#include "hcid.h"
48
49
#include "log.h"
49
50
#include "sdpd.h"
50
51
 
227
228
        return TRUE;
228
229
}
229
230
 
230
 
int start_sdp_server(uint16_t mtu, const char *did, uint32_t flags)
 
231
int start_sdp_server(uint16_t mtu, uint32_t flags)
231
232
{
232
233
        int compat = flags & SDP_SERVER_COMPAT;
233
234
        int master = flags & SDP_SERVER_MASTER;
240
241
                return -1;
241
242
        }
242
243
 
243
 
        if (did && strlen(did) > 0) {
244
 
                const char *ptr = did;
245
 
                uint16_t vid = 0x0000, pid = 0x0000, ver = 0x0000;
246
 
 
247
 
                vid = (uint16_t) strtol(ptr, NULL, 16);
248
 
                ptr = strchr(ptr, ':');
249
 
                if (ptr) {
250
 
                        pid = (uint16_t) strtol(ptr + 1, NULL, 16);
251
 
                        ptr = strchr(ptr + 1, ':');
252
 
                        if (ptr)
253
 
                                ver = (uint16_t) strtol(ptr + 1, NULL, 16);
254
 
                        register_device_id(vid, pid, ver);
255
 
                }
256
 
        }
 
244
        if (main_opts.did_source > 0)
 
245
                register_device_id();
257
246
 
258
247
        io = g_io_channel_unix_new(l2cap_sock);
259
248
        g_io_channel_set_close_on_unref(io, TRUE);