Ejemplo n.º 1
0
int agent_authorize(struct agent *agent,
			const char *path,
			const char *uuid,
			agent_cb cb,
			void *user_data,
			GDestroyNotify destroy)
{
	struct agent_request *req;
	int err;

	if (agent->request)
		return -EBUSY;

	req = agent_request_new(agent, AGENT_REQUEST_AUTHORIZE, cb,
							user_data, destroy);

	err = agent_call_authorize(req, path, uuid);
	if (err < 0) {
		agent_request_free(req, FALSE);
		return -ENOMEM;
	}

	agent->request = req;

	DBG("authorize request was sent for %s", path);

	return 0;
}
Ejemplo n.º 2
0
int agent_authorize(struct agent *agent,
//			const char *path,
			const struct btd_device *device, //CTS VERI
			const char *uuid,
			agent_cb cb,
			void *user_data,
			GDestroyNotify destroy)
{
	struct agent_request *req;
	int err;

	if (agent->request)
		return -EBUSY;

	req = agent_request_new(agent, AGENT_REQUEST_AUTHORIZE, cb,
							user_data, destroy);

//	err = agent_call_authorize(req, path, uuid);
	err = agent_call_authorize(req, device, uuid); //Broadocm Bluetooth feature - CTS VERI
	if (err < 0) {
		agent_request_free(req, FALSE);
		return -ENOMEM;
	}

	agent->request = req;

//	DBG("authorize request was sent for %s", path);
	DBG("authorize request was sent for %s", device_get_path(device)); //Broadocm Bluetooth feature - CTS VERI

	return 0;
}