~cyphermox/ubuntu/precise/bluez/4.98-0ubuntu4

« back to all changes in this revision

Viewing changes to audio/headset.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2011-04-05 10:09:16 UTC
  • mfrom: (1.1.31 upstream)
  • Revision ID: james.westby@ubuntu.com-20110405100916-3am5el1q0asa4ul2
Tags: 4.91-0ubuntu1
* New upstream release
* debian/libbluetooth3.symbols:
  - Updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
1345
1345
 
1346
1346
        error("Audio connection got disconnected");
1347
1347
 
 
1348
        pending_connect_finalize(device);
1348
1349
        headset_set_state(device, HEADSET_STATE_CONNECTED);
1349
1350
 
1350
1351
        return FALSE;
2385
2386
{
2386
2387
        struct headset *hs = dev->headset;
2387
2388
        unsigned int id;
 
2389
        int sock;
2388
2390
 
2389
2391
        if (hs->state == HEADSET_STATE_DISCONNECTED ||
2390
2392
                                hs->state == HEADSET_STATE_CONNECTING)
2395
2397
                hs->dc_timer = 0;
2396
2398
        }
2397
2399
 
2398
 
        headset_set_state(dev, HEADSET_STATE_CONNECTED);
 
2400
        sock = g_io_channel_unix_get_fd(hs->sco);
 
2401
 
 
2402
        /* shutdown but leave the socket open and wait for hup */
 
2403
        shutdown(sock, SHUT_RDWR);
2399
2404
 
2400
2405
        id = connect_cb_new(hs, HEADSET_STATE_CONNECTED, cb, user_data);
2401
 
        g_idle_add((GSourceFunc) dummy_connect_complete, dev);
2402
2406
 
2403
2407
        return id;
2404
2408
}