[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] newbie's question on code



Hi,

I'm looking at the hci.c and assistance to help me understand some of the 
code is greatly appreciated.

eg.

int
disconnect(unsigned int hdl, unsigned char reason)
{
	D_CMD(__FUNCTION__"\n");
	c_pkt.type = CMD_PKT;
	c_pkt.ocf = DISCONNECT;
	c_pkt.ogf = HCI_LC;

	memcpy(c_pkt.data, &hdl, 2);
	c_pkt.data[2] = reason;
	c_pkt.len = 3;

	return send_cmd((unsigned char*) &c_pkt ,c_pkt.len + CMD_HDR_LEN + 
HCI_HDR_LEN);
}

Q1. why does this need to return an integer ?
    i read the specs and it said that it does not need to return any
    parameters.

Q2. are the variables "hdl" and "reason" passed from the lower
    layers ?

thank you
gnesha
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com