]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/messages.c
Merge remote branch 'sf/product-2-2' into develop
[netatalk.git] / etc / afpd / messages.c
index e2dd1535c443a60a13a35d353603721a30b77e55..241f0d08166a166ed2a4b22f8d8b5e088c0b7876 100644 (file)
@@ -133,10 +133,11 @@ int afp_getsrvrmesg(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, siz
          * it has asked the login msg...
          * Workaround: concatenate the two if any, ugly.
          */
-        if (*message && *obj->options.loginmesg) {
-            strlcat(message, " - ", MAXMESGSIZE);
+        if (obj->options.loginmesg) {
+            if (*message)
+                strlcat(message, " - ", MAXMESGSIZE);
+            strlcat(message, obj->options.loginmesg, MAXMESGSIZE);
         }
-        strlcat(message, obj->options.loginmesg, MAXMESGSIZE);
         break;
     case AFPMESG_SERVER: /* server */
         break;