Return-Path: From: Michael Terry To: BlueZ development In-Reply-To: <1214593557.6131.26.camel@bongo> References: <1214593557.6131.26.camel@bongo> Date: Fri, 27 Jun 2008 15:18:42 -0400 Message-Id: <1214594322.6131.28.camel@bongo> Mime-Version: 1.0 Subject: Re: [Bluez-devel] Wizard patch Reply-To: BlueZ development List-Id: BlueZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1158489290==" Sender: bluez-devel-bounces@lists.sourceforge.net Errors-To: bluez-devel-bounces@lists.sourceforge.net --===============1158489290== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-FzuERotqYW9Dwwk2LIKu" --=-FzuERotqYW9Dwwk2LIKu Content-Type: multipart/mixed; boundary="=-YxVoisW2TowkQn0K+eE/" --=-YxVoisW2TowkQn0K+eE/ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Whoops, here's a fixed patch that actually installs the binary. -mt --=-YxVoisW2TowkQn0K+eE/ Content-Description: Content-Disposition: attachment; filename=wizard2.diff Content-Transfer-Encoding: base64 Content-Type: text/x-patch; charset=UTF-8 ZGlmZiAtcnVwTiBibHVlei1nbm9tZS0wLjI3Lm9yaWcvYXBwbGV0L21haW4uYyBibHVlei1nbm9t ZS0wLjI3L2FwcGxldC9tYWluLmMNCi0tLSBibHVlei1nbm9tZS0wLjI3Lm9yaWcvYXBwbGV0L21h aW4uYwkyMDA4LTA2LTI3IDE0OjEyOjQ5LjAwMDAwMDAwMCAtMDQwMA0KKysrIGJsdWV6LWdub21l LTAuMjcvYXBwbGV0L21haW4uYwkyMDA4LTA2LTI3IDE0OjEzOjA1LjAwMDAwMDAwMCAtMDQwMA0K QEAgLTYyNSw3ICs2MjUsNiBAQCBzdGF0aWMgdm9pZCBzZW5kdG9fY2FsbGJhY2soR09iamVjdCAq d2lkDQogCQlnX3ByaW50ZXJyKCJDb3VsZG4ndCBleGVjdXRlIGNvbW1hbmQ6ICVzXG4iLCB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iamVjdCwgIkFjdGl2YXRlU2VydmljZSIsIE5VTEws DQorCSAgICAgICAgICAgICAgICAgICAgICBHX1RZUEVfU1RSSU5HLCAiaW5wdXQiLCBHX1RZUEVf SU5WQUxJRCwNCisJICAgICAgICAgICAgICAgICAgICAgIEdfVFlQRV9TVFJJTkcsICZidXNuYW1l LCBHX1RZUEVfSU5WQUxJRCkpIHsNCisJCXByaXYtPmlucHV0X3NlcnZpY2UgPSBkYnVzX2dfcHJv eHlfbmV3X2Zvcl9uYW1lKHByaXYtPmNvbm4sIGJ1c25hbWUsDQorCQkgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiL29yZy9ibHVlei9pbnB1dCIsDQorCQkg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAib3JnLmJsdWV6 LmlucHV0Lk1hbmFnZXIiKTsNCisJCWdfZnJlZShidXNuYW1lKTsNCisJfQ0KKw0KKwlpZiAoZGJ1 c19nX3Byb3h5X2NhbGwocHJpdi0+bWFuYWdlcl9vYmplY3QsICJBY3RpdmF0ZVNlcnZpY2UiLCBO VUxMLA0KKwkgICAgICAgICAgICAgICAgICAgICAgR19UWVBFX1NUUklORywgImF1ZGlvIiwgR19U WVBFX0lOVkFMSUQsDQorCSAgICAgICAgICAgICAgICAgICAgICBHX1RZUEVfU1RSSU5HLCAmYnVz bmFtZSwgR19UWVBFX0lOVkFMSUQpKSB7DQorCQlwcml2LT5hdWRpb19zZXJ2aWNlID0gZGJ1c19n X3Byb3h5X25ld19mb3JfbmFtZShwcml2LT5jb25uLCBidXNuYW1lLA0KKwkJICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIi9vcmcvYmx1ZXovYXVkaW8iLA0K KwkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm9yZy5i bHVlei5hdWRpby5NYW5hZ2VyIik7DQorCQlnX2ZyZWUoY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DQo= --=-YxVoisW2TowkQn0K+eE/-- --=-FzuERotqYW9Dwwk2LIKu Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBIZT0S53i2YxNrdi0RAh5pAKCuh+j1gOLsc5w4Em2a8ikUcQZUEQCgv/KB evHx0ZewlTqQm8b4iSRr8W4= =34S5 -----END PGP SIGNATURE----- --=-FzuERotqYW9Dwwk2LIKu-- --===============1158489290== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php --===============1158489290== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel --===============1158489290==--