diff options
author | Filippo Giunchedi <filippo@esaurito.net> | 2009-07-02 11:14:24 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-07-02 17:21:53 +0300 |
commit | 6db7a480cdff7ca8bbfebd3b88b832481df3166e (patch) | |
tree | b600b7d79f351789465ed2bc99a095895b4da033 | |
parent | b96f44db8e91325968a0149595b2522d4a22481a (diff) | |
download | bluez-6db7a480cdff7ca8bbfebd3b88b832481df3166e.tar.gz |
test/agent.c: rename device into adapter in main
-rw-r--r-- | test/agent.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/agent.c b/test/agent.c index 01f9b7fba..64362e872 100644 --- a/test/agent.c +++ b/test/agent.c @@ -486,8 +486,8 @@ int main(int argc, char *argv[]) const char *capabilities = "DisplayYesNo"; struct sigaction sa; DBusConnection *conn; - char match_string[128], default_path[128], *device_id = NULL; - char *device_path = NULL, *agent_path = NULL, *target = NULL; + char match_string[128], default_path[128], *adapter_id = NULL; + char *adapter_path = NULL, *agent_path = NULL, *target = NULL; int opt; snprintf(default_path, sizeof(default_path), @@ -496,7 +496,7 @@ int main(int argc, char *argv[]) while ((opt = getopt_long(argc, argv, "+i:p:c:rh", main_options, NULL)) != EOF) { switch(opt) { case 'i': - device_id = optarg; + adapter_id = optarg; break; case 'p': if (optarg[0] != '/') { @@ -542,17 +542,17 @@ int main(int argc, char *argv[]) exit(1); } - if (!device_path) - device_path = get_device(conn, device_id); + if (!adapter_path) + adapter_path = get_device(conn, adapter_id); if (target) { - if (create_paired_device(conn, device_path, agent_path, + if (create_paired_device(conn, adapter_path, agent_path, capabilities, target) < 0) { dbus_connection_unref(conn); exit(1); } } else { - if (register_agent(conn, device_path, agent_path, + if (register_agent(conn, adapter_path, agent_path, capabilities) < 0) { dbus_connection_unref(conn); exit(1); @@ -580,9 +580,9 @@ int main(int argc, char *argv[]) } if (!__io_terminated && !target) - unregister_agent(conn, device_path, agent_path); + unregister_agent(conn, adapter_path, agent_path); - free(device_path); + free(adapter_path); free(agent_path); free(passkey); |