---
apps/obex_test/obex_test_client.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/apps/obex_test/obex_test_client.c
b/apps/obex_test/obex_test_client.c
index cd83ba3..8f0efc7 100644
--- a/apps/obex_test/obex_test_client.c
+++ b/apps/obex_test/obex_test_client.c
@@ -299,11 +299,10 @@ void put_client(obex_t *handle)
uint8_t *buf;
int file_size;
- printf("PUT file (local, remote)> ");
+ printf("PUT file (local)> ");
memset(lname, 0, sizeof(lname));
- memset(rname, 0, sizeof(rname));
- num = scanf("%199c %199c", lname, rname);
- if (num != 2) {
+ num = scanf("%199c", lname);
+ if (num != 1) {
perror("scanf:");
return;
}
@@ -315,6 +314,11 @@ void put_client(obex_t *handle)
return;
}
+ printf("PUT remote filename (default: %s)> ", lname);
+ memset(rname, 0, sizeof(rname));
+ num = scanf("%199c", rname);
+ if (num == 0)
+ strcpy(rname, lname);
printf("Going to send %d bytes\n", file_size);
/* Build object */
--
1.7.5.3
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today.
http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users