Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Nov 2008 20:58:40 +0000 (GMT)
From:      Iain Hibbert <plunky@rya-online.net>
To:        Guido Falsi <mad@madpilot.net>
Cc:        freebsd-bluetooth@freebsd.org
Subject:   Re: RFComm behaviour with nokia mobiles
Message-ID:  <1226091521.039371.399.nullmailer@galant.ukfsn.org>
In-Reply-To: <4910CA97.6030708@madpilot.net>
References:  <20081104111947.GB62907@megatron.madpilot.net> <1225799105.807983.1164.nullmailer@galant.ukfsn.org> <20081104135107.GA64776@megatron.madpilot.net> <1225821264.107584.759.nullmailer@galant.ukfsn.org> <4910B6E6.7070206@madpilot.net> <4910CA97.6030708@madpilot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Nov 2008, Guido Falsi wrote:

> Guido Falsi wrote:
>
> > As I said, that was my mistake. Anyway I thank you a lot because you gave me
> > the idea where to look for mistakes. I should be able to get gnokii to work
> > now. Thank you a lot again!
>
> I've just submitted a PR for the gnokii port. If someone feels like checking
> my work(it does need checking I think) it's here:

The attribute ID list should be in ascending order according to the
specification. This means though that some logic could be wrong because
the protocol descriptor list for any given service class would likely
appear before the service name in the response attribute list and you
would use the wrong channel..

probably you should do it like:

	channel = -1;

	switch (attribute) {
	case PROTOCOL_DESCRIPTOR_LIST
		channel = <...>;
		break;

	case SERVICE_NAME
		if (channel == -1)
			break;

		str = <...>;

		if (strncmp(str, "...")) {
			channel = -1;
			break;
		}

		return success;
	}

?

also, instead of providing two calls to the find_service_channel()
function, just put

#ifdef SDP_SERVICE_CLASS_SERIAL_PORT
#define SERIAL_PORT_SVCLASS_ID SDP_SERVICE_CLASS_SERIAL_PORT
#endif

at the top which cuts down on unreadable alternatives?

iain



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1226091521.039371.399.nullmailer>