summaryrefslogtreecommitdiff
path: root/misc/kdepim4/patches/patch-ao
blob: d58b64b2dd2e3f2e43c2e66e62efac24086ac4ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-ao,v 1.1 2010/09/01 13:45:25 wiz Exp $

libassuan2 support from
http://websvn.kde.org/?view=revision&revision=1078528

--- kleopatra/uiserver/uiserver.cpp.orig	2009-03-10 12:25:10.000000000 +0000
+++ kleopatra/uiserver/uiserver.cpp
@@ -73,15 +73,15 @@ UiServer::Private::Private( UiServer * q
       actualSocketName(),
       cryptoCommandsEnabled( false )
 {
-    assuan_set_assuan_err_source( GPG_ERR_SOURCE_DEFAULT );
+    assuan_set_gpg_err_source( GPG_ERR_SOURCE_DEFAULT );
 }
 
 bool UiServer::Private::isStaleAssuanSocket( const QString& fileName )
 {
     assuan_context_t ctx = 0;
-    const bool error = assuan_socket_connect_ext( &ctx, QFile::encodeName( fileName ).constData(), -1, 0 );
+    const bool error = assuan_new( &ctx ) || assuan_socket_connect( ctx, QFile::encodeName( fileName ).constData(), -1, 0 );
     if ( !error )
-        assuan_disconnect( ctx );
+        assuan_release( ctx );
     return error;
 }
 
@@ -166,13 +166,11 @@ void UiServer::Private::slotConnectionCl
 void UiServer::Private::incomingConnection( int fd ) {
     try {
         qDebug( "UiServer: client connect on fd %d", fd );
-#ifdef HAVE_ASSUAN_SOCK_GET_NONCE
         if ( assuan_sock_check_nonce( (assuan_fd_t)fd, &nonce ) ) {
             qDebug( "UiServer: nonce check failed" );
             assuan_sock_close( (assuan_fd_t)fd );
             return;
         }
-#endif
         const shared_ptr<AssuanServerConnection> c( new AssuanServerConnection( (assuan_fd_t)fd, factories ) );
         connect( c.get(), SIGNAL(closed(Kleo::AssuanServerConnection*)),
                  this, SLOT(slotConnectionClosed(Kleo::AssuanServerConnection*)) );