diff options
| author | Max Krasnyansky <maxk@qualcomm.com> | 2002-04-10 18:20:36 +0000 | 
|---|---|---|
| committer | Max Krasnyansky <maxk@qualcomm.com> | 2002-04-10 18:20:36 +0000 | 
| commit | 00012f0fe236ff884d28c12781398183dac51b7f (patch) | |
| tree | cc72519b2dc201d8d4bb723ac2a1e5d6118dae6c /src | |
| parent | cf7340b7aa8fc1a5cae9bc55b368ef4b110cebc0 (diff) | |
hci_req initialization fixes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/hci.c | 21 | 
1 files changed, 11 insertions, 10 deletions
| @@ -593,10 +593,12 @@ int hci_local_name(int dd, int len, char *name, int to)  	read_local_name_rp rp;  	struct hci_request rq; -	rq.ogf = OGF_HOST_CTL; -	rq.ocf = OCF_READ_LOCAL_NAME; +	rq.ogf    = OGF_HOST_CTL; +	rq.ocf    = OCF_READ_LOCAL_NAME; +	rq.cparam = NULL; +	rq.clen   = 0;  	rq.rparam = &rp; -	rq.rlen = READ_LOCAL_NAME_RP_SIZE; +	rq.rlen   = READ_LOCAL_NAME_RP_SIZE;  	if (hci_send_req(dd, &rq, to) < 0)  		return -1; @@ -620,8 +622,8 @@ int hci_remote_name(int dd, bdaddr_t *ba, int len, char *name, int to)  	memset(&cp, 0, sizeof(cp));  	bacpy(&cp.bdaddr, ba); -	rq.ogf = OGF_LINK_CTL; -	rq.ocf = OCF_REMOTE_NAME_REQ; +	rq.ogf    = OGF_LINK_CTL; +	rq.ocf    = OCF_REMOTE_NAME_REQ;  	rq.cparam = &cp;  	rq.clen   = REMOTE_NAME_REQ_CP_SIZE;  	rq.event  = EVT_REMOTE_NAME_REQ_COMPLETE; @@ -706,13 +708,12 @@ int hci_read_local_version(int dd, struct hci_version *ver, int to)  	read_local_version_rp rp;  	struct hci_request rq; -	memset(&rq, 0, sizeof(rq)); -	rq.ogf = OGF_INFO_PARAM; -	rq.ocf = OCF_READ_LOCAL_VERSION; +	rq.ogf    = OGF_INFO_PARAM; +	rq.ocf    = OCF_READ_LOCAL_VERSION;  	rq.cparam = NULL; -	rq.clen = 0; +	rq.clen   = 0;  	rq.rparam = &rp; -	rq.rlen = READ_LOCAL_VERSION_RP_SIZE; +	rq.rlen   = READ_LOCAL_VERSION_RP_SIZE;  	if (hci_send_req(dd, &rq, 1000) < 0)  		return -1; | 
