X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=blobdiff_plain;f=btpasskey%2Fbtpasskey.c;h=f918f12715a356f99acd55954e8d31ebfd7d3a97;hb=d1d66f72ac7ad5b99fdabb78c7387febf7739413;hp=4c5e1b57e11de5c87c57bf2c4cdef4886c3b5b12;hpb=5bbb50853bf359a0d6d32e43eb330f84b2bbb1be;p=oss%2Fbtcli.git diff --git a/btpasskey/btpasskey.c b/btpasskey/btpasskey.c index 4c5e1b5..f918f12 100644 --- a/btpasskey/btpasskey.c +++ b/btpasskey/btpasskey.c @@ -53,7 +53,7 @@ char* resolve_bluetooth_name(DBusConnection *conn,const char *adapter,const cha fprintf(stderr,"dbus_message_new_method_call error\n"); exit(1); } - dbus_message_append_args(msg,DBUS_TYPE_STRING,btaddress,DBUS_TYPE_INVALID); + dbus_message_append_args(msg,DBUS_TYPE_STRING,&btaddress,DBUS_TYPE_INVALID); if (!dbus_connection_send_with_reply(conn, msg, &pending,-1) || NULL==pending) @@ -379,7 +379,7 @@ static void usage(const char *progname) printf("Options:\n" "\t -p, --path agent-path - set D-Bus object path for agent\n" "\t -d, --discoverable - switch default adapter into discoverable\n" - "\t\tmode whie waiting for pairing request\n" + "\t\tmode while waiting for pairing request\n" "\t -P, --pair address - initiate pairing with specified address\n" "\t -r, --remove address - remove pairing with specified device and exit\n"); } @@ -427,6 +427,7 @@ int main(int argc, char *argv[]) exit(0); case 'V': printf("btpasskey " VERSION " Copyright (c) 2007-2008, Victor Wagner\n"); + exit(0); default: fprintf(stderr,"Invalid option -%c. Use %s --help\n", opt,argv[0]);