diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2008-08-29 23:51:00 +0200 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2008-08-29 23:51:00 +0200 | 
| commit | 41708dccb5d831adaf0862da9c1d7fe3c197db3c (patch) | |
| tree | ca7b5d1e137becfed48de5609021c337459fdea8 /src/main.c | |
| parent | 72994f35faec1a0b8f1f3d2a348f2f70d3611728 (diff) | |
| parent | fe8e6804983fd09a3293c5d7ae9a64e03cbc80e0 (diff) | |
Merge branch 'for-upstream' of git://gitorious.org/bluez/cktakahasis-clone
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 33 | 
1 files changed, 12 insertions, 21 deletions
| @@ -53,11 +53,20 @@  #include "hcid.h"  #include "sdpd.h"  #include "adapter.h" -#include "dbus-common.h" -#include "dbus-database.h"  #include "dbus-hci.h" +#include "dbus-common.h"  #include "agent.h"  #include "manager.h" +#include "storage.h" + +enum { +	HCID_SET_NAME, +	HCID_SET_CLASS, +	HCID_SET_PAGETO, +	HCID_SET_DISCOVTO, +	HCID_SET_LM, +	HCID_SET_LP, +};  struct hcid_opts hcid;  struct device_opts default_device; @@ -325,7 +334,7 @@ no_address:  	return device_opts->discovto;  } -void update_service_classes(const bdaddr_t *bdaddr, uint8_t value) +static void update_service_classes(const bdaddr_t *bdaddr, uint8_t value)  {  	struct hci_dev_list_req *dl;  	struct hci_dev_req *dr; @@ -536,15 +545,6 @@ static void configure_device(int dev_id)  	memset(&dr, 0, sizeof(dr));  	dr.dev_id = dev_id; -	/* Set packet type */ -	if ((device_opts->flags & (1 << HCID_SET_PTYPE))) { -		dr.dev_opt = device_opts->pkt_type; -		if (ioctl(dd, HCISETPTYPE, (unsigned long) &dr) < 0) { -			error("Can't set packet type on hci%d: %s (%d)", -					dev_id, strerror(errno), errno); -		} -	} -  	/* Set link mode */  	if ((device_opts->flags & (1 << HCID_SET_LM))) {  		dr.dev_opt = device_opts->link_mode; @@ -605,15 +605,6 @@ static void configure_device(int dev_id)  					WRITE_PAGE_TIMEOUT_CP_SIZE, &cp);  	} -	/* Set voice setting */ -	if ((device_opts->flags & (1 << HCID_SET_VOICE))) { -		write_voice_setting_cp cp; - -		cp.voice_setting = htobl(device_opts->voice); -		hci_send_cmd(dd, OGF_HOST_CTL, OCF_WRITE_VOICE_SETTING, -					WRITE_VOICE_SETTING_CP_SIZE, &cp); -	} -  	exit(0);  } | 
