Date: Tue, 19 Oct 2010 18:24:01 +0100 (BST) From: Iain Hibbert <plunky@rya-online.net> To: freebsd-bluetooth@freebsd.org Subject: obexapp print stream statistics after transfer Message-ID: <1287509041.022618.4884.nullmailer@galant.ukfsn.org>
next in thread | raw e-mail | index | archive | help
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-708220811-1287509041=:4478 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi, the attached patch implements a statistics report after a stream transfer in client mode, eg % obexapp -a phone -C ftrn -f -n put image.jpg 146753 bytes streamed in 13 seconds (11288 bytes/sec) regards, iain --0-708220811-1287509041=:4478 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=stat.diff Content-Transfer-Encoding: BASE64 Content-ID: <alpine.NEB.2.00.1010191824010.4478@localhost.> Content-Description: Content-Disposition: attachment; filename=stat.diff LS0tIGNsaWVudC5jLm9yaWcJMjAxMC0wMS0wOCAxODozMToyMi4wMDAwMDAw MDAgKzAwMDANCisrKyBjbGllbnQuYwkyMDEwLTEwLTE5IDE4OjE0OjM4LjAw MDAwMDAwMCArMDEwMA0KQEAgLTUwLDYgKzUwLDcgQEANCiAjaW5jbHVkZSAi Y2xpZW50LmgiDQogI2luY2x1ZGUgImV2ZW50LmgiDQogI2luY2x1ZGUgImxv Zy5oIg0KKyNpbmNsdWRlICJzdHJlYW0uaCINCiAjaW5jbHVkZSAidXRpbC5o Ig0KIA0KIC8qDQpAQCAtNzY5LDYgKzc3MCw4IEBAIG9iZXhhcHBfY2xpZW50 X3JlcXVlc3RfcHV0KG9iZXhfdCAqaGFuZGwNCiAJCQlsb2dfZXJyKCIlcygp OiBDb3VsZCBub3QgYWRkIEhEUl9CT0RZIiwgX19mdW5jX18pOw0KIAkJCWdv dG8gZG9uZTsNCiAJCX0NCisNCisJCW9iZXhhcHBfc3RyZWFtX3N0YXRzX3Jl c2V0KGNvbnRleHQpOw0KIAkJYnJlYWs7DQogDQogCWNhc2UgT0JFWEFQUF9Q V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c2V0KGNvbnRleHRf dCAqY29udGV4dCkNCit7DQorCWNvbnRleHQtPnN0b3RhbCA9IDA7DQorCWNv bnRleHQtPnN0aW1lID0gdGltZShOVUxMKTsNCit9DQorDQordm9pZA0KK29i ZXhhcHBfc3RyZWFtX3N0YXRzX3ByaW50KGNvbnRleHRfdCAqY29udGV4dCkN Cit7DQorCWludCB0bTsNCisNCisJdG0gPSAoaW50KSh0aW1lKE5VTEwpIC0g Y29udGV4dC0+c3RpbWUpOw0KKwlwcmludGYoIiV6dSBieXRlcyBzdHJlYW1l ZCBpbiAlZCBzZWNvbmQlcyIsDQorCSAgICBjb250ZXh0LT5zdG90YWwsIHRt LCAodG0gPT0gMSA/ICIiIDogInMiKSk7DQorCWlmICh0bSA+IDEpDQorCQlw cmludGYoIiAoJXp1IGJ5dGVzL3NlYykiLCBjb250ZXh0LT5zdG90YWwgLyB0 bSk7DQorCXByaW50ZigiXG4iKTsNCit9DQotLS0gc3RyZWFtLmgub3JpZwky MDA3LTAyLTIyIDIwOjM1OjAxLjAwMDAwMDAwMCArMDAwMA0KKysrIHN0cmVh bS5oCTIwMTAtMTAtMTkgMTg6MDE6NDUuMDAwMDAwMDAwICswMTAwDQpAQCAt MzUsNSArMzUsOCBAQA0KIG9iZXhhcHBfZXZlbnRfaGFuZGxlcl90CW9iZXhh cHBfc3RyZWFtX3dyaXRlOw0KIG9iZXhhcHBfZXZlbnRfaGFuZGxlcl90CW9i ZXhhcHBfc3RyZWFtX3JlYWQ7DQogDQordm9pZCBvYmV4YXBwX3N0cmVhbV9z dGF0c19yZXNldChjb250ZXh0X3QgKik7DQordm9pZCBvYmV4YXBwX3N0cmVh bV9zdGF0c19wcmludChjb250ZXh0X3QgKik7DQorDQogI2VuZGlmIC8qIF9T VFJFQU1fSF8gKi8NCiANCg== --0-708220811-1287509041=:4478--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1287509041.022618.4884.nullmailer>