SF.net SVN: gar:[24057] csw/mgar/pkg/netatalk/trunk

slowfranklin at users.sourceforge.net slowfranklin at users.sourceforge.net
Fri Aug 29 14:58:18 CEST 2014


Revision: 24057
          http://sourceforge.net/p/gar/code/24057
Author:   slowfranklin
Date:     2014-08-29 12:58:16 +0000 (Fri, 29 Aug 2014)
Log Message:
-----------
netatalk/trunk: Backport two patches for Spotlight and mDNS

Modified Paths:
--------------
    csw/mgar/pkg/netatalk/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/netatalk/trunk/files/0001-Spotlight-enhance-behaviour-for-long-running-queries.patch
    csw/mgar/pkg/netatalk/trunk/files/0002-netatalk-fix-a-crash-on-Solaris-when-registering-wit.patch

Modified: csw/mgar/pkg/netatalk/trunk/Makefile
===================================================================
--- csw/mgar/pkg/netatalk/trunk/Makefile	2014-08-28 21:47:37 UTC (rev 24056)
+++ csw/mgar/pkg/netatalk/trunk/Makefile	2014-08-29 12:58:16 UTC (rev 24057)
@@ -54,6 +54,9 @@
 PATCHFILES += 0001-Disable-noinst-binary-fails-to-link-on-SPARC.patch
 PATCHFILES += 0002-Ensure-gsettings-is-called-from-opt-csw-bin.patch
 PATCHFILES += 0003-Disable-dbus-start-by-default.patch
+# will be in 3.1.7
+PATCHFILES += 0001-Spotlight-enhance-behaviour-for-long-running-queries.patch
+PATCHFILES += 0002-netatalk-fix-a-crash-on-Solaris-when-registering-wit.patch
 
 PRESERVECONF += $(sysconfdir)/afp.conf
 PRESERVECONF += $(sysconfdir)/extmap.conf

Added: csw/mgar/pkg/netatalk/trunk/files/0001-Spotlight-enhance-behaviour-for-long-running-queries.patch
===================================================================
--- csw/mgar/pkg/netatalk/trunk/files/0001-Spotlight-enhance-behaviour-for-long-running-queries.patch	                        (rev 0)
+++ csw/mgar/pkg/netatalk/trunk/files/0001-Spotlight-enhance-behaviour-for-long-running-queries.patch	2014-08-29 12:58:16 UTC (rev 24057)
@@ -0,0 +1,65 @@
+From 2e2040f26fda19d0db3de3f914b55ee657741ca1 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <rb at sernet.de>
+Date: Fri, 29 Aug 2014 10:58:51 +0200
+Subject: [PATCH 1/2] Spotlight: enhance behaviour for long running queries
+
+Status code 35 is taken from an AFP packet capture.
+
+Clients will now show a "progress wheel" while waiting for initial
+results.
+
+Signed-off-by: Ralph Boehme <rb at sernet.de>
+---
+ NEWS                 |  5 +++++
+ etc/afpd/spotlight.c | 15 ++++++++++++++-
+ 2 files changed, 19 insertions(+), 1 deletion(-)
+
+diff --git a/NEWS b/NEWS
+index a306a1e..f98e319 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,8 @@
++Changes in 3.1.7
++================
++* UPD: Spotlight: enhance behaviour for long running queries, client
++       will now show "progress wheel" while waiting for first results.
++
+ Changes in 3.1.6
+ ================
+ * FIX: Spotlight: fix for long running queries
+diff --git a/etc/afpd/spotlight.c b/etc/afpd/spotlight.c
+index 8644d46..d2539b8 100644
+--- a/etc/afpd/spotlight.c
++++ b/etc/afpd/spotlight.c
+@@ -402,7 +402,7 @@ static bool create_result_handle(slq_t *slq)
+ static bool add_results(sl_array_t *array, slq_t *slq)
+ {
+     sl_filemeta_t *fm;
+-    uint64_t status = 0;
++    uint64_t status;
+ 
+     /* FileMeta */
+     fm = talloc_zero(array, sl_filemeta_t);
+@@ -410,6 +410,19 @@ static bool add_results(sl_array_t *array, slq_t *slq)
+         return false;
+     }
+ 
++    switch (slq->slq_state) {
++    case SLQ_STATE_RUNNING:
++        /*
++         * Wtf, why 35? Taken from an AFP capture.
++         */
++        status = 35;
++        break;
++
++    default:
++        status = 0;
++        break;
++    }
++
+     dalloc_add_copy(array, &status, uint64_t);
+     dalloc_add(array, slq->query_results->cnids, sl_cnids_t);
+     if (slq->query_results->num_results > 0) {
+-- 
+1.9.3
+

Added: csw/mgar/pkg/netatalk/trunk/files/0002-netatalk-fix-a-crash-on-Solaris-when-registering-wit.patch
===================================================================
--- csw/mgar/pkg/netatalk/trunk/files/0002-netatalk-fix-a-crash-on-Solaris-when-registering-wit.patch	                        (rev 0)
+++ csw/mgar/pkg/netatalk/trunk/files/0002-netatalk-fix-a-crash-on-Solaris-when-registering-wit.patch	2014-08-29 12:58:16 UTC (rev 24057)
@@ -0,0 +1,67 @@
+From eff6b8621d8857f1b2e52054b42688d412041138 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <rb at sernet.de>
+Date: Fri, 29 Aug 2014 14:52:43 +0200
+Subject: [PATCH 2/2] netatalk: fix a crash on Solaris when registering with
+ mDNS
+
+Signed-off-by: Ralph Boehme <rb at sernet.de>
+---
+ NEWS                    | 1 +
+ etc/netatalk/afp_mdns.c | 8 ++------
+ 2 files changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index f98e319..6ab9cc1 100644
+--- a/NEWS
++++ b/NEWS
+@@ -2,6 +2,7 @@ Changes in 3.1.7
+ ================
+ * UPD: Spotlight: enhance behaviour for long running queries, client
+        will now show "progress wheel" while waiting for first results.
++* FIX: netatalk: fix a crash on Solaris when registering with mDNS
+ 
+ Changes in 3.1.6
+ ================
+diff --git a/etc/netatalk/afp_mdns.c b/etc/netatalk/afp_mdns.c
+index 65ea55a..e298270 100644
+--- a/etc/netatalk/afp_mdns.c
++++ b/etc/netatalk/afp_mdns.c
+@@ -18,7 +18,6 @@
+ 
+ #include <atalk/logger.h>
+ #include <atalk/util.h>
+-#include <atalk/dsi.h>
+ #include <atalk/unicode.h>
+ #include <atalk/netatalk_conf.h>
+ 
+@@ -160,7 +159,6 @@ static void unregister_stuff() {
+ static void register_stuff(const AFPObj *obj) {
+     uint                                        port;
+     const struct vol                *volume;
+-    DSI                                         *dsi;
+     char                                        name[MAXINSTANCENAMELEN+1];
+     DNSServiceErrorType         error;
+     TXTRecordRef                        txt_adisk;
+@@ -234,8 +232,6 @@ static void register_stuff(const AFPObj *obj) {
+         LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name");
+         goto fail;
+     }
+-    LOG(log_info, logtype_afpd, "Registering server '%s' with Bonjour",
+-        dsi->bonjourname);
+ 
+     error = DNSServiceRegister(&svc_refs[svc_ref_count++],
+                                0,               // no flags
+@@ -276,8 +272,8 @@ static void register_stuff(const AFPObj *obj) {
+     }
+ 
+     if (obj->options.mimicmodel) {
+-        LOG(log_info, logtype_afpd, "Registering server '%s' with model '%s'",
+-            dsi->bonjourname, obj->options.mimicmodel);
++        LOG(log_info, logtype_afpd, "Registering server as model '%s'",
++            obj->options.mimicmodel);
+         TXTRecordCreate(&txt_devinfo, 0, NULL);
+         if ( 0 > TXTRecordPrintf(&txt_devinfo, "model", obj->options.mimicmodel) ) {
+             LOG ( log_error, logtype_afpd, "Could not create Zeroconf TXTRecord for model");
+-- 
+1.9.3
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list