return FALSE;
server = g_malloc0(sizeof(bt_agent_osp_server_t));
- retv_if(server == NULL, FALSE);
-
server->type = type;
if (type == BT_RFCOMM_SERVER) {
server->uuid = g_strdup(uuid);
addr += 4;
g_strlcpy(agent->pairing_addr, addr, sizeof(agent->pairing_addr));
- while ((pos = strchr(agent->pairing_addr, '_')) != NULL) {
+ while ((pos = strchr(agent->pairing_addr, '_')) != NULL)
*pos = ':';
- }
}
agent->cb.pincode_func(agent, device);
addr += 4;
g_strlcpy(priv->pairing_addr, addr, sizeof(priv->pairing_addr));
- while ((pos = strchr(priv->pairing_addr, '_')) != NULL) {
+ while ((pos = strchr(priv->pairing_addr, '_')) != NULL)
*pos = ':';
- }
}
priv->cb.passkey_func(priv, device);
addr += 4;
g_strlcpy(priv->pairing_addr, addr, sizeof(priv->pairing_addr));
- while ((pos = strchr(priv->pairing_addr, '_')) != NULL) {
+ while ((pos = strchr(priv->pairing_addr, '_')) != NULL)
*pos = ':';
- }
}
priv->cb.confirm_func(priv, device, passkey);
g_strlcpy(priv->authorize_addr, addr,
sizeof(priv->authorize_addr));
- while ((pos = strchr(priv->authorize_addr, '_')) != NULL) {
+ while ((pos = strchr(priv->authorize_addr, '_')) != NULL)
*pos = ':';
- }
}
priv->cb.authorize_func(priv, device, uuid);
priv->busname = NULL;
} else {
priv->busname = g_strdup(g_dbus_proxy_get_name(proxy));
- g_object_unref(proxy);
BT_DBG("Busname: %s", priv->busname);
+ g_object_unref(proxy);
}
}
osp_serv = __gap_agent_find_server(priv->osp_servers,
type, uuid);
- if (!osp_serv) {
+ if (!osp_serv)
return NULL;
- }
return osp_serv;
}