]> arthur.barton.de Git - netatalk.git/commitdiff
Always send sleeptime in hours
authorFrank Lahm <franklahm@googlemail.com>
Sat, 2 Apr 2011 14:26:51 +0000 (16:26 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Sat, 2 Apr 2011 14:26:51 +0000 (16:26 +0200)
etc/afpd/auth.c

index 94f7601db62334f34d29738709e7ed0071fe0854..675111e6529c1fef092b4e0eda6be78b84011129 100644 (file)
@@ -473,21 +473,19 @@ int afp_zzz(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen
         }
     }
 
-    if (dsi->flags & DSI_SLEEPING) {
-        /*
-         * According to AFP 3.3 spec we should not return anything,
-         * but eg 10.5.8 server still returns the numbers of hours
-         * the server is keeping the sessino (ie max sleeptime).
-         */
-        data = obj->options.sleep / 120; /* hours */
-        if (!data) {
-            data = 1;
-        }
-        *rbuflen = sizeof(data);
-        data = htonl(data);
-        memcpy(rbuf, &data, sizeof(data));
-        rbuf += sizeof(data);
+    /*
+     * According to AFP 3.3 spec we should not return anything,
+     * but eg 10.5.8 server still returns the numbers of hours
+     * the server is keeping the sessino (ie max sleeptime).
+     */
+    data = obj->options.sleep / 120; /* hours */
+    if (!data) {
+        data = 1;
     }
+    *rbuflen = sizeof(data);
+    data = htonl(data);
+    memcpy(rbuf, &data, sizeof(data));
+    rbuf += sizeof(data);
 
     return AFP_OK;
 }