On Tue, 21 Jun 2011, Hendrik Sattler wrote:

> Am Dienstag, 21. Juni 2011, 17:39:32 schrieb Iain Hibbert:
> > Hi,
> >
> > I found a problem running obexapp with newer OpenOBEX library, in that it
> > previously called OBEX_ServerRegister(), passing a sockaddr as requested,
> > but that the newer OpenOBEX now returns a failure for this..
> >
> > The reason for the failure being that obexapp uses a custom transport and
> > custom transport handling does not provide any set_local_addr method.
> >
> > I'm not sure that the address it passed was significant in any way (and
> > obexapp does not expect that it is), so just passing an empty address may
> > have been correct for that, but before I file a bug report with the
> > obexapp author is it an acceptable regression for OpenOBEX? The
> > alternative would be to provide an empty set_local_addr for the custom
> > transport..
>
> Same goes for the FD transport. Using dummy values is not correct as the
> custom transport cannot validate the value. So IMHO returning -1 in this case
> is right. Using NULL and 0 willl work with the old version _IF_ the memcpy()
> does  work with
>       memcpy(foo, NULL, 0);

Hm, that may be Ok I think, though C99 does not specifically allow it..

perhaps it would be better to just ignore any passed addresses, if the
backend does not need it?  There is no way, AFAIK, for the calling code to
recover that address anyway..

> > (although obexapp provides Bluetooth service, I'm not sure if Max wrote it
> > before the BtOBEX was created, or if he chose the custom transport so that
> > it could register SDP services aswell)
>
> How are SDP services registered on BSD?

Well, obexapp registers the service from inside the custom transport
"listen" callback, once the RFCOMM channel is known

There are a couple of library APIs to do that though.. FreeBSD had one
which I initially ported to NetBSD but it was lacking in features and
flexibility and parsing SDP data was complex and error prone, so I
redesigned it a couple of years ago. (I have patches for obexftp
somewhere, should probably repost them though obexftp seems dead now?)

iain

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Openobex-users mailing list
Openobex-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to