Commit Graph

1576 Commits

Author SHA1 Message Date
Luiz Augusto von Dentz
8d18c289c7 AVRCP: split AVCTP specific code from control.c
The code is moved to avctp.c to simplify control.c
2011-09-13 10:44:54 +03:00
Luiz Augusto von Dentz
c612aee09d AVRCP: rename avrcp_spec_avc_pdu to avrcp_header
Since old avrcp_header got renamed to avc_header now we can use
avrcp_header for AVRCP PDUs.
2011-09-13 10:44:53 +03:00
Luiz Augusto von Dentz
222b464a6d AVRCP: rename avrcp_header to avc_header
AVCTP carries AV/C packets/PDUs not AVRCP as avrcp_header suggests.
2011-09-13 10:44:51 +03:00
Luiz Augusto von Dentz
09984fd9c6 AVRCP: use a vtable to simplify PDU parsing/handling
This simplify a bit the handling by introducing common checks before
calling the handler callback, it is also much easier to add/remove
new PDUs in this way.
2011-09-13 10:44:48 +03:00
Lucas De Marchi
dec26ee50d Fix fd usage when not connected
When the avctp channel is not connected, we call
g_io_channel_unix_get_fd() with a NULL pointer. Glib does not check the
pointer before dereferencing it, causing bluetoothd to segv.

Move the function call to the place it's actually needed, after the
safety checks.
2011-08-30 15:53:57 +03:00
Marcel Holtmann
35906565c9 audio: Update license for shared header files
The header files with constants and structures for audio specific
interaction with Pulseaudio are suppose to be under LGPL license.

For some odd reason a2dp-codecs.h ended up being under GPL license
which is against the intention of this being shared and re-used by
non-GPL programs. Fix this now to avoid any future confusion.
2011-08-26 11:18:54 -07:00
Frédéric Dalleau
021813afd9 Implement media_transport for HFP_HS_UUID
The transport is used by pulseaudio to suspend and resume streams.
2011-08-24 14:22:38 +03:00
Frédéric Dalleau
06eb47dec5 Introduce gateway locking mechanism 2011-08-24 14:22:31 +03:00
Frédéric Dalleau
9ce8d3f01e Set state to "connecting" when AG connects.
This state is used by media.c to trigger pulseaudio configuration.
2011-08-24 14:21:12 +03:00
Frédéric Dalleau
270f3bb47c Fix RFCOMM disconnect on suspend request
When pulseaudio release an audio stream, gateway.c disconnects
RFCOMM instead of disconnecting only SCO.
2011-08-24 14:21:09 +03:00
Frédéric Dalleau
d3f534025c Update g_strcmp0 to strcasecmp 2011-08-24 14:21:07 +03:00
Frédéric Dalleau
9a0bab4796 Use state change callback from media interface
When a HFPHS endpoint is created, media will start to watch for
HandsfreeGateway state changes. media call SetConfiguration upon
connection and ClearConfiguration upon disconnection.
2011-08-24 14:21:03 +03:00
Frédéric Dalleau
083177c86c Add state change callback to HandsfreeGateway
Media interface needs to monitor state changes of HandsfreeGateway.
2011-08-24 14:20:59 +03:00
Frédéric Dalleau
a471827d1f Fix double free in error case in endpoint_reply
If SetConfiguration call fails, the headset or gateway for which
SetConfiguration is called is disconnected. This will free any
pending request, but this does not prevent the request to
terminate (endpoint_reply) and try to free itself once again.
Note that a copy of the freed pointer is tested which has not
been updated.
2011-08-24 14:20:55 +03:00
Peter Hurley
84f4d71d7d Fix get/set_hfp_active to match name conventions
These two functions are defined exclusively for headsets, so
follow established name conventions.
2011-08-22 11:04:24 +03:00
Peter Hurley
f9dddf3f41 Increase timeout before initiating AVDTP connection
AVDTP_CONNECT_TIMEOUT controls the delay between HSP/HFP
connection establishment and AVDTP signal channel establishment.
The original value of 1 sec. is too short to avoid racing for AVDTP
connection establishment (eg., if the device continues to configure
the HFP service level connection with additional AT cmds).

Some devices have broken AVDTP implementations that just cannot
handle the race conditions that arise if both devices are attempting
stream establishment at the same time. However, these conditions arise
only when the remote device is the ACL initiator (and in practice, the
RFCOMM initiator as well).  This fix bumps out the timeout value only
when the headset has initiated the link.
2011-08-22 10:49:02 +03:00
Johan Hedberg
8ec11b427e Clean up code in control.c 2011-08-12 11:26:11 +03:00
Lucas De Marchi
a21e648cf0 avrcp: update copyright 2011-08-12 11:05:13 +03:00
Lucas De Marchi
ab7e71ed87 avrcp: change TG record to use version 1.3 2011-08-12 11:05:11 +03:00
Lucas De Marchi
1a3de7bae4 avrcp: send response for registered events
When a certain event occur, check if CT registered to receive that
notification and send a response.

Example event for PTS test TC_TG_NFY_BV_02_C:

> ACL data: handle 11 flags 0x02 dlen 22
    L2CAP(d): cid 0x0043 len 18 [psm 23]
      AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
        AV/C: Notify: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: RegisterNotification: pt 0x00 len 0x0005
            EventID: 0x02 (EVENT_TRACK_CHANGED)
            Interval: 0x00000000 (0 seconds)
< ACL data: handle 11 flags 0x02 dlen 26
    L2CAP(d): cid 0x0043 len 22 [psm 23]
      AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Interim: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: RegisterNotification: pt 0x00 len 0x0009
            EventID: 0x02 (EVENT_TRACK_CHANGED)
            Identifier: 0x0 (PLAYING)

[...]

< ACL data: handle 11 flags 0x02 dlen 26
    L2CAP(d): cid 0x0043 len 22 [psm 23]
      AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Changed: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: RegisterNotification: pt 0x00 len 0x0009
            EventID: 0x02 (EVENT_TRACK_CHANGED)
            Identifier: 0x0 (PLAYING)
2011-08-12 11:05:10 +03:00
Lucas De Marchi
a5924f6600 avrcp: handle GetElementAttributes pdu
Example responses for PTS test TC_TG_MDI_BV_04_C:

> ACL data: handle 11 flags 0x02 dlen 26
    L2CAP(d): cid 0x0042 len 22 [psm 23]
      AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
        AV/C: Status: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetElementAttributes: pt 0x00 len 0x0009
            Identifier: 0x0 (PLAYING)
            AttributeCount: 0x00
< ACL data: handle 11 flags 0x02 dlen 70
    L2CAP(d): cid 0x0042 len 66 [psm 23]
      AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetElementAttributes: pt 0x00 len 0x0035
            AttributeCount: 0x03
            Attribute: 0x00000001 (Title)
            CharsetID: 0x006a (UTF-8)
            AttributeValueLength: 0x0012
            AttributeValue: Walking on the Sun
            Attribute: 0x00000002 (Artist)
            CharsetID: 0x006a (UTF-8)
            AttributeValueLength: 0x0005
            AttributeValue: Lucas
            Attribute: 0x00000007 (Progress)
            CharsetID: 0x006a (UTF-8)
            AttributeValueLength: 0x0005
            AttributeValue: 32029

And TC_TG_MDI_BV_05_C:

> ACL data: handle 11 flags 0x02 dlen 30
    L2CAP(d): cid 0x0043 len 26 [psm 23]
      AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
        AV/C: Status: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetElementAttributes: pt 0x00 len 0x000d
            Identifier: 0x0 (PLAYING)
            AttributeCount: 0x01
            Attribute: 0x00000001 (Title)
< ACL data: handle 11 flags 0x02 dlen 44
    L2CAP(d): cid 0x0043 len 40 [psm 23]
      AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetElementAttributes: pt 0x00 len 0x001b
            AttributeCount: 0x01
            Attribute: 0x00000001 (Title)
            CharsetID: 0x006a (UTF-8)
            AttributeValueLength: 0x0012
            AttributeValue: Walking on the Sun
2011-08-12 11:05:08 +03:00
Lucas De Marchi
e468f8f1e9 avrcp: handle query for supported events 2011-08-12 11:04:52 +03:00
Lucas De Marchi
6ae019ed13 avrcp: handle RegisterNotification pdu
Handle mandatory events according to AVRCP 1.3 spec.
2011-08-12 11:04:50 +03:00
Lucas De Marchi
177d7aea76 avrcp: handle GetPlayStatus pdu
Example response for PTS test TC_TG_MDI_BV_02_C:

> ACL data: handle 11 flags 0x02 dlen 17
    L2CAP(d): cid 0x0043 len 13 [psm 23]
      AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
        AV/C: Status: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetPlayStatus: pt 0x00 len 0x0000
< ACL data: handle 11 flags 0x02 dlen 26
    L2CAP(d): cid 0x0043 len 22 [psm 23]
      AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetPlayStatus: pt 0x00 len 0x0009
            SongLength: 0x0000a7f8 (43000 miliseconds)
            SongPosition: 0x00012fad (77741 miliconds)
            PlayStatus: 0x01 (PLAYING)
2011-08-12 11:04:49 +03:00
Lucas De Marchi
ea42bc7391 avrcp: handle InformBatteryStatusOfCT pdu 2011-08-12 11:04:47 +03:00
Lucas De Marchi
bb8e4d6a12 avrcp: handle InformDisplayableCharacterSet pdu 2011-08-12 11:04:45 +03:00
Lucas De Marchi
3e5bde2244 avrcp: handle commands for future extension
AVRCP_GET_PLAYER_ATTRIBUTE_TEXT and AVRCP_GET_PLAYER_VALUE_TEXT shall
only be used if TG has extended attributes.

For the ones defined in AVRCP spec these commands should not be called.
Since we do not have extended attributes yet we can ignore those
commands.
2011-08-12 11:04:43 +03:00
Lucas De Marchi
81b99b59ad avrcp: handle SetPlayerApplicationSettingValue pdu 2011-08-12 11:04:42 +03:00
Lucas De Marchi
908d91867b avrcp: handle GetCurrentPlayerAplicationSettingValue pdu
Example response for PTS test TC_TG_PAS_BV_10_C:

> ACL data: handle 11 flags 0x02 dlen 19
    L2CAP(d): cid 0x0043 len 15 [psm 23]
      AVCTP: Command : pt 0x00 transaction 3 pid 0x110e
        AV/C: Status: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetCurrentPlayerApplicationSettingValue: pt 0x00 len 0x0002
            AttributeCount: 0x01
            AttributeID: 0x01 (Equalizer ON/OFF Status)
< ACL data: handle 11 flags 0x02 dlen 20
    L2CAP(d): cid 0x0043 len 16 [psm 23]
      AVCTP: Response : pt 0x00 transaction 3 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetCurrentPlayerApplicationSettingValue: pt 0x00 len 0x0003
            ValueCount: 0x01
            AttributeID: 0x01 (Equalizer ON/OFF Status)
            ValueID: 0x02 (ON)
2011-08-12 11:04:40 +03:00
Lucas De Marchi
0834a161e6 avrcp: handle ListPlayerApplicationSettingValues pdu
Example of response obtained with PTS test TC_TG_PAS_BV_06_C:

> ACL data: handle 11 flags 0x02 dlen 18
    L2CAP(d): cid 0x0043 len 14 [psm 23]
      AVCTP: Command : pt 0x00 transaction 3 pid 0x110e
        AV/C: Status: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: ListPlayerApplicationSettingValues: pt 0x00 len 0x0001
            AttributeID: 0x01 (Equalizer ON/OFF Status)
< ACL data: handle 11 flags 0x02 dlen 20
    L2CAP(d): cid 0x0043 len 16 [psm 23]
      AVCTP: Response : pt 0x00 transaction 3 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: ListPlayerApplicationSettingValues: pt 0x00 len 0x0003
            ValueCount: 0x02
            ValueID: 0x01 (OFF)
            ValueID: 0x02 (ON)
2011-08-12 11:04:38 +03:00
Lucas De Marchi
0c6cadf915 avrcp: handle ListPlayerApplicationSettingAttributes pdu
Example of response obtained with PTS test TC_TG_PAS_BV_06_C:

> ACL data: handle 11 flags 0x02 dlen 17
    L2CAP(d): cid 0x0043 len 13 [psm 23]
      AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
        AV/C: Status: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: ListPlayerApplicationSettingAttributes: pt 0x00 len 0x0000
< ACL data: handle 11 flags 0x02 dlen 20
    L2CAP(d): cid 0x0043 len 16 [psm 23]
      AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: ListPlayerApplicationSettingAttributes: pt 0x00 len 0x0003
            AttributeCount: 0x02
            AttributeID: 0x01 (Equalizer ON/OFF Status)
            AttributeID: 0x04 (Scan ON/OFF Status)
2011-08-12 11:04:37 +03:00
Lucas De Marchi
f25568f3b6 avrcp: handle query for company ids
Example of response for PTS test TC_TG_CFG_BV_02_C:

> ACL data: handle 11 flags 0x02 dlen 18
    L2CAP(d): cid 0x0043 len 14 [psm 23]
      AVCTP: Command : pt 0x00 transaction 2 pid 0x110e
        AV/C: Status: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetCapabilities: pt 0x00 len 0x0001
            CapabilityID: 0x02 (CompanyID)
< ACL data: handle 11 flags 0x02 dlen 22
    L2CAP(d): cid 0x0043 len 18 [psm 23]
      AVCTP: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetCapabilities: pt 0x00 len 0x0005
            CapabilityID: 0x02 (CompanyID)
            CapabilityCount: 0x01
            CompanyID: 0x001958
2011-08-12 11:04:35 +03:00
Lucas De Marchi
65e27905fe avrcp: implement ChangeTrack() method
ChangeTrack() is used by applications to inform bluetoothd that current
track changed, passing also the metadata.
2011-08-12 11:04:33 +03:00
Lucas De Marchi
85206cbbde avrcp: implement ChangePlayback() method
ChangePlayback() is used by applications to inform bluetoothd of the
current status of playback.
2011-08-12 11:04:32 +03:00
Lucas De Marchi
b7dd3c8a8a avrcp: implement SetProperty() method of MediaPlayer
SetProperty() is used by an application to set player specific
settings.
2011-08-12 11:04:30 +03:00
Lucas De Marchi
8c8eaec49b avrcp: add skeleton of MediaPlayer interface 2011-08-12 11:04:29 +03:00
Lucas De Marchi
be70215da3 audio: move interface declarations to their headers 2011-08-12 11:04:27 +03:00
Syam Sidhardhan
6e863c7e83 Fix crash when disconnecting A2DP
When we disconnect an A2DP device by immediate power off and quickly
also initiate a disconnection from our side, a crash is occurring. This
is happening because of the disconnect_timeout coming after freeing the
session.
2011-08-12 10:57:36 +03:00
Luiz Augusto von Dentz
bd3ca4fdf4 Fix possible invalid read/free on media.c
This also fix the circular dependency of media.c and a2dp.c

 Invalid read of size 8
    at 0x4EA8CC2: g_slice_free_chain_with_offset (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x13AF33: path_free (media.c:417)
    by 0x11EB39: remove_interface (object.c:563)
    by 0x11F360: g_dbus_unregister_interface (object.c:715)
    by 0x120C49: media_server_remove (manager.c:1098)
    by 0x4EA9826: g_slist_foreach (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x178915: adapter_remove (adapter.c:2326)
    by 0x17535F: btd_manager_unregister_adapter (manager.c:293)
    by 0x154081: device_event (hciops.c:2643)
    by 0x1543C1: io_stack_event (hciops.c:2763)
    by 0x4E8C88C: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x4E8D087: ??? (in /lib64/libglib-2.0.so.0.2908.0)
  Address 0x63f6638 is 8 bytes inside a block of size 16 free'd
    at 0x4A055FE: free (vg_replace_malloc.c:366)
    by 0x4E938F2: g_free (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x4EA854E: g_slice_free1 (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x4EA930C: g_slist_remove (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x13AE53: media_endpoint_remove (media.c:118)
    by 0x4EA9826: g_slist_foreach (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x4EA984A: g_slist_free_full (in /lib64/libglib-2.0.so.0.2908.0)
    by 0x13AF33: path_free (media.c:417)
    by 0x11EB39: remove_interface (object.c:563)
    by 0x11F360: g_dbus_unregister_interface (object.c:715)
    by 0x120C49: media_server_remove (manager.c:1098)
    by 0x4EA9826: g_slist_foreach (in /lib64/libglib-2.0.so.0.2908.0)
2011-08-08 16:47:02 +03:00
Anderson Lizardo
3c19214717 Remove bogus extra semicolons 2011-08-08 13:04:34 +03:00
Dmitriy Paliy
fad552de92 Fix cancel pending D-Bus call to ohmd
Pending D-Bus call to ohmd daemon is canceled if telephony driver is
unloaded before reply comes.
2011-08-05 12:40:29 +03:00
Johan Hedberg
fb25161654 Move around static functions to avoid forward-declarations 2011-08-05 12:40:06 +03:00
Dmitriy Paliy
ccd40753e9 Add stop playing ringtone to maemo6 telephony driver
If ringtone is loud enough, it may leak to microphone when call is
answered via Bluetooth headset. As result, it can be heard on remote
end. Therefore, playing ringtone shall be stopped as fast as possible
before answering a call.
2011-08-05 12:39:42 +03:00
Frédéric Dalleau
bc66f33f63 Minor style fix in audio/gateway.c 2011-08-05 12:19:35 +03:00
Frédéric Dalleau
b15f606312 Add watch for RFCOMM disconnect to HFP HF role 2011-08-05 12:18:41 +03:00
Frédéric Danis
3163523575 audio: add profile version to HandsfreeAgent
Some phones with HFP Audio Gateway version previous to 1.5 (e.g.
Samsung SGH-D600 returning 0x0101 as profile version) do not accept an
AT+BRSF with latest features. The Handsfree agent should adapt its
AT+BRSF command depending on the remote version, so add version
information as parameter of NewConnection method.

Here is traces of buggy exchange:

< ACL data: handle 12 flags 0x02 dlen 20
    L2CAP(d): cid 0x0046 len 16 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 10 pf 0 ilen 12 fcs 0xb0
      0000: 41 54 2b 42 52 53 46 3d  31 31 38 0d              AT+BRSF=118.
> ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(d): cid 0x0041 len 14 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 10 pf 1 ilen 9 fcs 0x76 credits 1
      0000: 0d 0a 45 52 52 4f 52 0d  0a                       ..ERROR..
< ACL data: handle 12 flags 0x02 dlen 8
    L2CAP(d): cid 0x0046 len 4 [psm 3]
      RFCOMM(s): DISC: cr 1 dlci 10 pf 1 ilen 0 fcs 0x6d

and after the fix (and corresponding fix in oFono):

< ACL data: handle 12 flags 0x02 dlen 19
    L2CAP(d): cid 0x0048 len 15 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 10 pf 0 ilen 11 fcs 0xb0
      0000: 41 54 2b 42 52 53 46 3d  32 32 0d                 AT+BRSF=22.
> ACL data: handle 12 flags 0x02 dlen 28
    L2CAP(d): cid 0x0041 len 24 [psm 3]
      RFCOMM(d): UIH: cr 0 dlci 10 pf 1 ilen 19 fcs 0x76 credits 1
      0000: 0d 0a 2b 42 52 53 46 3a  20 33 33 0d 0a 0d 0a 4f  ..+BRSF: 33....O
      0010: 4b 0d 0a                                          K..
< ACL data: handle 12 flags 0x02 dlen 18
    L2CAP(d): cid 0x0048 len 14 [psm 3]
      RFCOMM(d): UIH: cr 1 dlci 10 pf 0 ilen 10 fcs 0xb0
      0000: 41 54 2b 43 49 4e 44 3d  3f 0d                    AT+CIND=?.
2011-08-04 14:02:39 +03:00
Claudio Takahasi
9c0c6b6b33 Remove unneeded textfile header includes 2011-08-02 10:53:38 +03:00
Szymon Janc
53e6e763d2 Fix telephony driver compilation with GLib < 2.28 2011-07-19 00:05:40 +03:00
Lukasz Rymanowski
c34e795644 Fix headset state callback in Media API
Headset watch is not registered per device. Therefore, when headset
disconnects, there is need to check for which audio device it is called.
2011-07-10 10:57:17 +03:00
Peter Hurley
5d88d8d690 avdtp: fix race condition when starting a stream
The AVDTP spec allows for a race condition between remote and local
device when issuing an AVDTP_START cmd on a stream in the OPEN state.

However, the internal state must continue to be consistent. For example,
suppose that avdtp_start() has been called while in the OPEN state and
a AVDTP_START cmd is sent.  Now before we have received a response (and
thus entered the STREAMING state), we *receive* a START cmd. Prior to
this fix, since the sep is still in the OPEN state, we would accept
the new START cmd. This will leads us to send both a Start_Ind and
Start_Cfm - not good.

Now, we track this transitional state (starting == TRUE).

NB - 'starting' is only in a valid state while the sep is in the
OPEN state. 'starting' is reset when we return to the OPEN state.
2011-07-10 10:55:19 +03:00