X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Fmessages.c;h=cd3f32f78545ab79d39764a0ccd60d92ae94f7ae;hb=df7560dfdb12b06090dc4b2c6e88d0858930b591;hp=975ec7a975fda8156ad4738e87152c006c80d2a4;hpb=ad220cd96d55445846d30b951a188ec5f9b849b2;p=netatalk.git diff --git a/etc/afpd/messages.c b/etc/afpd/messages.c index 975ec7a9..cd3f32f7 100644 --- a/etc/afpd/messages.c +++ b/etc/afpd/messages.c @@ -16,7 +16,8 @@ #include #include #include -#include "globals.h" +#include + #include "misc.h" @@ -41,9 +42,9 @@ void readmessage(AFPObj *obj) int rc; static int c; uid_t euid; - u_int32_t maxmsgsize; + uint32_t maxmsgsize; - maxmsgsize = (obj->proto == AFPPROTO_DSI)?MIN(MAX(((DSI*)obj->handle)->attn_quantum, MAXMESGSIZE),MAXPATHLEN):MAXMESGSIZE; + maxmsgsize = (obj->proto == AFPPROTO_DSI)?MIN(MAX(((DSI*)obj->dsi)->attn_quantum, MAXMESGSIZE),MAXPATHLEN):MAXMESGSIZE; i=0; /* Construct file name SERVERTEXT/message.[pid] */ @@ -112,15 +113,15 @@ void readmessage(AFPObj *obj) int afp_getsrvrmesg(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, size_t *rbuflen) { char *message; - u_int16_t type, bitmap; - u_int16_t msgsize; + uint16_t type, bitmap; + uint16_t msgsize; size_t outlen = 0; size_t msglen = 0; int utf8 = 0; *rbuflen = 0; - msgsize = (obj->proto == AFPPROTO_DSI)?MAX(((DSI*)obj->handle)->attn_quantum, MAXMESGSIZE):MAXMESGSIZE; + msgsize = (obj->proto == AFPPROTO_DSI)?MAX(((DSI*)obj->dsi)->attn_quantum, MAXMESGSIZE):MAXMESGSIZE; memcpy(&type, ibuf + 2, sizeof(type)); memcpy(&bitmap, ibuf + 4, sizeof(bitmap));