]> arthur.barton.de Git - netatalk.git/blobdiff - include/atalk/globals.h
Proper check whether code runs in an AFP session context or not
[netatalk.git] / include / atalk / globals.h
index e1aca81491f28c871558862141267e37d03ec61e..e34f4ee829e33ccef3842880511c89abfb08a863 100644 (file)
@@ -50,6 +50,8 @@
 #define PASSWD_NOSAVE  (1 << 1)
 #define PASSWD_ALL     (PASSWD_SET | PASSWD_NOSAVE)
 
+#define IS_AFP_SESSION(obj) ((obj)->dsi && (obj)->dsi->serversock == -1)
+
 /**********************************************************************************************
  * Ini config sections
  **********************************************************************************************/