Mantis Bugtracker

Простой вид комментарии ] расширенный вид ] история ] печать ]
Номер Категория Серьезность Воспроизводимость Создан Изменен
0000132 [obex-data-server] General нововведение всегда 2008-09-23 20:53 2008-10-17 18:00
Инициатор heston_james Видимость общая  
Ответственный skirsdeda
Приоритет обычный Решение повторно открыт  
Состояние нужен отклик   Версия продукта 0.3.4
Суть 0000132: Expose session SDP channel in GetSessionInfo()
Подробности It would be great to be able to access the channel which ODS uses to connect to a device, this could be made accessible through the GetSessionInfo() method.

If this channel is supplied in the pattern to CreateBluetoothSession() then it should be added to the session object ASAP, if no channel is supplied then the session object should be updated once ODS has successfully acquired it from the remote device via SDP.
Дополнительные сведения
Tэги Нет прикрепленных тэгов.
Вложенные файлы

- Связи

-  Комментарии
heston_james (инициатор)
2008-10-06 11:57

Morning Tadas,

I've been doing a little thinking about the implementation of this over the weekend and at the moment I'm a little concerned that this might just be introducing another race condition within the app?

Imagine we successfully SDP a device and the channel is added to the session info, our app is currently unaware of this, the connection attempt then fails and the signal is broadcast to our app. We then only have a very small window in which to call GetSessionInfo() before the session is destroyed.

At the moment I'm thinking that in addition to adding the channel to the session info structure, perhaps we should also be alerting the calling app with a signal? perhaps 'ServiceChannelFound()' or 'SessionInfoUpdated()'. These would allow us to pull the channel from the session as soon as it is added, rather than running the risk of the session closing before we call GetSessionInfo()

Does that make sense? what are your thoughts on this?


skirsdeda (администратор)
2008-10-06 15:14

That's a good point. I'll have this in mind.
heston_james (инициатор)
2008-10-06 16:30

Excelent, I'll leave it in your capable hands to find a clean solution :-D
skirsdeda (администратор)
2008-10-09 23:23

Available in svn rev 2016. There is now BluetoothChannel in SessionInfo. BTW, it is a string like all other data in SessionInfo.
heston_james (инициатор)
2008-10-17 14:48

Afternoon Tadas,

Sorry to reopen this again but I have been doing a little testing and noticed an issue. It seems that the channel only becomes available when the session connects successfully. Is that correct?

See, If I try and connect a session to a Nokia handset, the SDP completes successfully, but if the connection times out, or is refused then the BluetoothChannel is not available in the session information, as I would expect it to be.

It would be great if we could have the bluetooth channel available regardless of whether the session connects or not, so long as the SDP is successful then it should be placed into the session object.

Cheers mate,

skirsdeda (администратор)
2008-10-17 15:36

Now Channel is put into session info when connection finishes (either succeeds or fails). When it fails, session info is freed immediately and that is the problem. The most I can do is put used Channel into session info as early as it is known (before establishing RFCOMM connection), but then there will be no way for external app to know WHEN used channel becomes available in session info.
heston_james (инициатор)
2008-10-17 18:00

Ah ok Tadas, so this is a race condition type of issue I suppose.

Hmm, its a challenge to know how to combat that without introducing another signal on the API which is broadcast when the channel is found.


- история
Дата изменения Пользователь Поле Изменение
2008-09-23 20:53 heston_james Новый вопрос
2008-09-23 20:58 skirsdeda Состояние новый => назначен
2008-09-23 20:58 skirsdeda Ответственный => skirsdeda
2008-09-23 20:59 skirsdeda Целевая версия => 0.4
2008-10-06 11:57 heston_james Комментарий добавлен: 0000433
2008-10-06 15:14 skirsdeda Комментарий добавлен: 0000434
2008-10-06 16:30 heston_james Комментарий добавлен: 0000437
2008-10-09 23:23 skirsdeda Комментарий добавлен: 0000454
2008-10-09 23:23 skirsdeda Состояние назначен => отработан
2008-10-09 23:23 skirsdeda Решен в версии => 0.4
2008-10-09 23:23 skirsdeda Решение открыт => решен
2008-10-17 14:48 heston_james Комментарий добавлен: 0000475
2008-10-17 14:48 heston_james Состояние отработан => нужен отклик
2008-10-17 14:48 heston_james Решение решен => повторно открыт
2008-10-17 15:36 skirsdeda Комментарий добавлен: 0000477
2008-10-17 18:00 heston_james Комментарий добавлен: 0000481

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker