diff options
author | Alexander Orlenko <zxteam@gmail.com> | 2010-08-23 20:18:45 +1100 |
---|---|---|
committer | Alexander Orlenko <zxteam@gmail.com> | 2010-08-23 20:18:45 +1100 |
commit | 09556b563f4577bc86ea2d68de1fd518c61075d2 (patch) | |
tree | 7084158caa0d623a423e08c82dff7cfd03f9a56f | |
parent | 6432c87a1730024d8a80eceae0404f7b9d3e08cd (diff) | |
download | bluez-tools-09556b563f4577bc86ea2d68de1fd518c61075d2.tar.gz |
Some fixes in manual pages
Fixed bug in bt-adapter if device "Name" does not resolved (device discover mode)
Fixed bug in bt-obex if unknown device name specified for OPP mode
-rw-r--r-- | contrib/man/bt-adapter.pod | 4 | ||||
-rw-r--r-- | contrib/man/bt-device.pod | 4 | ||||
-rw-r--r-- | contrib/man/bt-obex.pod | 8 | ||||
-rw-r--r-- | src/bt-adapter.1 | 6 | ||||
-rw-r--r-- | src/bt-adapter.c | 4 | ||||
-rw-r--r-- | src/bt-device.1 | 6 | ||||
-rw-r--r-- | src/bt-monitor.1 | 2 | ||||
-rw-r--r-- | src/bt-network.c | 4 | ||||
-rw-r--r-- | src/bt-obex.1 | 8 | ||||
-rw-r--r-- | src/bt-obex.c | 12 |
10 files changed, 31 insertions, 27 deletions
diff --git a/contrib/man/bt-adapter.pod b/contrib/man/bt-adapter.pod index 5a19ada..44febef 100644 --- a/contrib/man/bt-adapter.pod +++ b/contrib/man/bt-adapter.pod @@ -40,8 +40,8 @@ B<-d, --discover> Discover remote devices (with remote device name resolving) B<--set E<lt>propertyE<gt> E<lt>valueE<gt>> - Change adapter properties (see PROPERTIES section for list of - available properties) + Change adapter properties (see ADAPTER PROPERTIES section for list + of available properties) =head1 ADAPTER PROPERTIES diff --git a/contrib/man/bt-device.pod b/contrib/man/bt-device.pod index 3821905..d75aa92 100644 --- a/contrib/man/bt-device.pod +++ b/contrib/man/bt-device.pod @@ -52,8 +52,8 @@ B<-s, --services E<lt>name|macE<gt> [E<lt>patternE<gt>]> the `pattern` parameter can be used to specify specific UUIDs B<--set E<lt>propertyE<gt> E<lt>valueE<gt>> - Change device properties (see PROPERTIES section for list of - available properties) + Change device properties (see DEVICE PROPERTIES section for list + of available properties) B<-v, --verbose> Verbosely display remote service records (affect to service diff --git a/contrib/man/bt-obex.pod b/contrib/man/bt-obex.pod index 41559ef..5ca19a8 100644 --- a/contrib/man/bt-obex.pod +++ b/contrib/man/bt-obex.pod @@ -32,15 +32,15 @@ B<-a, --adapter E<lt>name|macE<gt>> B<-s, --server [E<lt>pathE<gt>]> Register agent at OBEX server and set incoming/root directory to `path` or current folder will be used; Agent is used to - accept/reject imcoming bluetooth object push requests + accept/reject incoming bluetooth object push requests B<-p, --opp E<lt>name|macE<gt> E<lt>fileE<gt>> - Send local file to the specified remove device using object push + Send local file to the specified remote device using object push profile B<-f, --ftp E<lt>name|macE<gt>> - Start ftp session with remote device; If session opened - successfuly, ftp shell will be opened + Start FTP session with remote device; If session opened + successfuly, FTP shell will be opened FTP commands: diff --git a/src/bt-adapter.1 b/src/bt-adapter.1 index 2a21b37..966ea8c 100644 --- a/src/bt-adapter.1 +++ b/src/bt-adapter.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "bt-adapter 1" -.TH bt-adapter 1 "2010-08-11" "" "bluez-tools" +.TH bt-adapter 1 "2010-08-16" "" "bluez-tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -167,8 +167,8 @@ show information about adapter, change adapter properties or discover remote dev Discover remote devices (with remote device name resolving) .PP \&\fB\-\-set <property> <value>\fR - Change adapter properties (see \s-1PROPERTIES\s0 section for list of - available properties) + Change adapter properties (see \s-1ADAPTER\s0 \s-1PROPERTIES\s0 section for list + of available properties) .SH "ADAPTER PROPERTIES" .IX Header "ADAPTER PROPERTIES" string Address [ro] diff --git a/src/bt-adapter.c b/src/bt-adapter.c index 28b9731..e39ef86 100644 --- a/src/bt-adapter.c +++ b/src/bt-adapter.c @@ -46,8 +46,8 @@ static void adapter_device_found(Adapter *adapter, const gchar *address, GHashTa if (g_hash_table_size(found_devices) == 0) g_print("\n"); g_print("[%s]\n", address); - g_print(" Name: %s\n", g_value_get_string(g_hash_table_lookup(values, "Name"))); - g_print(" Alias: %s\n", g_value_get_string(g_hash_table_lookup(values, "Alias"))); + g_print(" Name: %s\n", g_hash_table_lookup(values, "Name") != NULL ? g_value_get_string(g_hash_table_lookup(values, "Name")) : NULL); + g_print(" Alias: %s\n", g_hash_table_lookup(values, "Alias") != NULL ? g_value_get_string(g_hash_table_lookup(values, "Alias")) : NULL); g_print(" Address: %s\n", g_value_get_string(g_hash_table_lookup(values, "Address"))); g_print(" Icon: %s\n", g_value_get_string(g_hash_table_lookup(values, "Icon"))); g_print(" Class: 0x%x\n", g_value_get_uint(g_hash_table_lookup(values, "Class"))); diff --git a/src/bt-device.1 b/src/bt-device.1 index 4873024..8093aa7 100644 --- a/src/bt-device.1 +++ b/src/bt-device.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "bt-device 1" -.TH bt-device 1 "2010-08-12" "" "bluez-tools" +.TH bt-device 1 "2010-08-16" "" "bluez-tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -179,8 +179,8 @@ discover remote device services or change device properties. the `pattern` parameter can be used to specify specific UUIDs .PP \&\fB\-\-set <property> <value>\fR - Change device properties (see \s-1PROPERTIES\s0 section for list of - available properties) + Change device properties (see \s-1DEVICE\s0 \s-1PROPERTIES\s0 section for list + of available properties) .PP \&\fB\-v, \-\-verbose\fR Verbosely display remote service records (affect to service diff --git a/src/bt-monitor.1 b/src/bt-monitor.1 index 779ee89..23cca82 100644 --- a/src/bt-monitor.1 +++ b/src/bt-monitor.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "bt-monitor 1" -.TH bt-monitor 1 "2010-08-11" "" "bluez-tools" +.TH bt-monitor 1 "2010-08-16" "" "bluez-tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/src/bt-network.c b/src/bt-network.c index 4b751c0..61bd55d 100644 --- a/src/bt-network.c +++ b/src/bt-network.c @@ -174,9 +174,9 @@ int main(int argc, char *argv[]) } } + g_main_loop_unref(mainloop); g_object_unref(network); g_object_unref(device); - g_main_loop_unref(mainloop); } else if (server_arg) { server_uuid_arg = argv[1]; server_brige_arg = argv[2]; @@ -214,8 +214,8 @@ int main(int argc, char *argv[]) exit_if_error(error); g_print("%s server unregistered\n", server_uuid_upper); - g_free(server_uuid_upper); g_main_loop_unref(mainloop); + g_free(server_uuid_upper); g_object_unref(network_server); } diff --git a/src/bt-obex.1 b/src/bt-obex.1 index 2fca75a..c286646 100644 --- a/src/bt-obex.1 +++ b/src/bt-obex.1 @@ -124,7 +124,7 @@ .\" ======================================================================== .\" .IX Title "bt-obex 1" -.TH bt-obex 1 "2010-08-12" "" "bluez-tools" +.TH bt-obex 1 "2010-08-15" "" "bluez-tools" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -159,15 +159,15 @@ You can send and receive files to/from remote device using this tool. \&\fB\-s, \-\-server [<path>]\fR Register agent at \s-1OBEX\s0 server and set incoming/root directory to `path` or current folder will be used; Agent is used to - accept/reject imcoming bluetooth object push requests + accept/reject incoming bluetooth object push requests .PP \&\fB\-p, \-\-opp <name|mac> <file>\fR Send local file to the specified remove device using object push profile .PP \&\fB\-f, \-\-ftp <name|mac>\fR - Start ftp session with remote device; If session opened - successfuly, ftp shell will be opened + Start \s-1FTP\s0 session with remote device; If session opened + successfuly, \s-1FTP\s0 shell will be opened .PP .Vb 1 \& FTP commands: diff --git a/src/bt-obex.c b/src/bt-obex.c index 704e1e6..937287e 100644 --- a/src/bt-obex.c +++ b/src/bt-obex.c @@ -276,12 +276,16 @@ int main(int argc, char *argv[]) gchar *src_address = g_strdup(adapter_get_address(adapter)); /* Get destination address (address of remote device) */ - Device *device = find_device(adapter, opp_device_arg, &error); - if (error && g_strcmp0(dbus_g_error_get_name(error), "org.bluez.Error.DoesNotExist") != 0) + gchar *dst_address = NULL; + if (g_regex_match_simple("^\\x{2}:\\x{2}:\\x{2}:\\x{2}:\\x{2}:\\x{2}$", opp_device_arg, 0, 0)) { + dst_address = g_strdup(opp_device_arg); + } else { + Device *device = find_device(adapter, opp_device_arg, &error); exit_if_error(error); - gchar *dst_address = g_strdup(device == NULL ? opp_device_arg : device_get_address(device)); + dst_address = g_strdup(device_get_address(device)); + g_object_unref(device); + } - g_object_unref(device); g_object_unref(adapter); /* Build arguments */ |