Author: blino
Date: Mon Feb 12 21:45:28 2007
New Revision: 120186

Added:
   packages/cooker/bluez-utils/current/SOURCES/bluez-utils-3.9-pin-exec.patch
      - copied, changed from r120157, 
/packages/cooker/bluez-utils/current/SOURCES/bluez-utils-3.8-pin-exec.patch
Removed:
   packages/cooker/bluez-utils/current/SOURCES/bluez-utils-3.8-pin-exec.patch
Modified:
   packages/cooker/bluez-utils/current/SPECS/bluez-utils.spec

Log:
restore passkey-agent (#28555)

Copied: 
packages/cooker/bluez-utils/current/SOURCES/bluez-utils-3.9-pin-exec.patch 
(from r120157, 
/packages/cooker/bluez-utils/current/SOURCES/bluez-utils-3.8-pin-exec.patch)
==============================================================================
--- /packages/cooker/bluez-utils/current/SOURCES/bluez-utils-3.8-pin-exec.patch 
(original)
+++ packages/cooker/bluez-utils/current/SOURCES/bluez-utils-3.9-pin-exec.patch  
Mon Feb 12 21:45:28 2007
@@ -1,8 +1,6 @@
-diff -ru bluez-utils-3.7.orig/hcid/passkey-agent.c 
bluez-utils-3.7/hcid/passkey-agent.c
---- bluez-utils-3.7.orig/hcid/passkey-agent.c  2006-04-28 14:30:59.000000000 
+0000
-+++ bluez-utils-3.7/hcid/passkey-agent.c       2006-10-12 19:23:52.000000000 
+0000
-@@ -76,7 +77,12 @@
- {
+--- bluez-utils-3.9/daemon/passkey-agent.c.auth        2007-01-25 
16:09:25.000000000 +0100
++++ bluez-utils-3.9/daemon/passkey-agent.c     2007-02-12 21:35:53.000000000 
+0100
+@@ -77,6 +77,11 @@
        DBusMessage *reply;
        const char *path, *address;
        dbus_bool_t numeric;
@@ -14,10 +12,11 @@
  
        if (!passkey)
                return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-@@ -91,8 +97,34 @@
-               fprintf(stderr, "Can't create reply message\n");
-               return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-       }
+@@ -96,7 +101,33 @@
+ 
+       printf("Passkey request for device %s\n", address);
+ 
+-      dbus_message_append_args(reply, DBUS_TYPE_STRING, &passkey,
 +    buflen=strlen(passkey)+256;
 +    if(buflen<=256)
 +    {
@@ -43,14 +42,12 @@
 +    s_passkey=&buffer[4];
 +    if(s_passkey[strlen(s_passkey)-1]=='\n') 
s_passkey[strlen(s_passkey)-1]='\0';
 +    fprintf(stderr, "Found passkey: \"%s\"\n", s_passkey);
- 
--      dbus_message_append_args(reply, DBUS_TYPE_STRING, &passkey,
 +
 +      dbus_message_append_args(reply, DBUS_TYPE_STRING, &s_passkey ,
                                        DBUS_TYPE_INVALID);
  
        dbus_connection_send(conn, reply, NULL);
-@@ -100,7 +132,7 @@
+@@ -104,7 +135,7 @@
        dbus_connection_flush(conn);
  
        dbus_message_unref(reply);
@@ -59,7 +56,7 @@
        return DBUS_HANDLER_RESULT_HANDLED;
  }
  
-@@ -263,10 +295,10 @@
+@@ -334,10 +365,10 @@
  
  static void usage(void)
  {

Modified: packages/cooker/bluez-utils/current/SPECS/bluez-utils.spec
==============================================================================
--- packages/cooker/bluez-utils/current/SPECS/bluez-utils.spec  (original)
+++ packages/cooker/bluez-utils/current/SPECS/bluez-utils.spec  Mon Feb 12 
21:45:28 2007
@@ -1,5 +1,5 @@
 %define version 3.9
-%define release %mkrel 3
+%define release %mkrel 4
 %define xinit_level 80
 
 Name:           bluez-utils
@@ -25,7 +25,7 @@
 Patch3:         bluez-utils-2.25-fixcups.patch
 # kmobiletools backport of standard auth by pin exec prog
 # http://kmobiletools.org/files/bluez-pin-exec-patch-r2.diff.bz2
-Patch4:         bluez-utils-3.8-pin-exec.patch
+Patch4:         bluez-utils-3.9-pin-exec.patch
 
 URL:            http://bluez.sourceforge.net/
 License:        GPL
@@ -70,6 +70,7 @@
 %setup -q
 %patch0 -p1 -b .defaultconf
 %patch3 -p1 -b .fixcups
+%patch4 -p1 -b .auth
 
 
 #needed by patch3
@@ -111,7 +112,7 @@
 mkdir -p $RPM_BUILD_ROOT/sbin
 cp $RPM_BUILD_ROOT%{_bindir}/hidd $RPM_BUILD_ROOT/sbin/
 cp $RPM_BUILD_ROOT%{_sbindir}/hcid $RPM_BUILD_ROOT/sbin/
-#cp hcid/passkey-agent $RPM_BUILD_ROOT%{_bindir}
+cp daemon/passkey-agent $RPM_BUILD_ROOT%{_bindir}
 #cp hcid/dbus-test $RPM_BUILD_ROOT%{_bindir}/bluez-dbus-test
 
 install -D -m0755 %{SOURCE10} $RPM_BUILD_ROOT/sbin/udev_bluetooth_helper

Reply via email to