]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/fork.c
New option parsing
[netatalk.git] / etc / afpd / fork.c
index 3bfbbf639ee8f3093178aaae048dcc05c5f0f297..8e0ba7325bfd450c3b7f9003198c013494fec151 100644 (file)
@@ -304,10 +304,10 @@ int afp_openfork(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, si
 
     if ( fork == OPENFORK_DATA ) {
         eid = ADEID_DFORK;
-        adflags = ADFLAGS_DF | ADFLAGS_HF ;
+        adflags = ADFLAGS_DF | ADFLAGS_HF | ADFLAGS_NOHF;
     } else {
         eid = ADEID_RFORK;
-        adflags = ADFLAGS_RF | ADFLAGS_HF;
+        adflags = ADFLAGS_RF | ADFLAGS_HF | ADFLAGS_NOHF;
         if (!(access & OPENACC_WR))
             adflags |= ADFLAGS_NORF;
     }
@@ -320,7 +320,7 @@ int afp_openfork(AFPObj *obj _U_, char *ibuf, size_t ibuflen _U_, char *rbuf, si
 
     LOG(log_debug, logtype_afpd, "afp_openfork(\"%s\", %s, %s)",
         fullpathname(s_path->u_name),
-        (fork & OPENFORK_RSCS) ? "data" : "reso",
+        (fork == OPENFORK_DATA) ? "data" : "reso",
         !(access & OPENACC_WR) ? "O_RDONLY" : "O_RDWR");
 
     ret = AFPERR_NOOBJ;
@@ -852,7 +852,7 @@ static int read_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, si
     /* dsi can stream requests. we can only do this if we're not checking
      * for an end-of-line character. oh well. */
     if ((obj->proto == AFPPROTO_DSI) && (*rbuflen < reqcount) && !nlmask) {
-        DSI    *dsi = obj->handle;
+        DSI    *dsi = obj->dsi;
         off_t  size;
 
         /* reqcount isn't always truthful. we need to deal with that. */
@@ -1195,7 +1195,7 @@ static int write_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, s
     switch (obj->proto) {
     case AFPPROTO_DSI:
     {
-        DSI *dsi = obj->handle;
+        DSI *dsi = obj->dsi;
         /* find out what we have already and write it out. */
         cc = dsi_writeinit(dsi, rbuf, *rbuflen);
 
@@ -1265,8 +1265,8 @@ static int write_fork(AFPObj *obj, char *ibuf, size_t ibuflen _U_, char *rbuf, s
 
 afp_write_err:
     if (obj->proto == AFPPROTO_DSI) {
-        dsi_writeinit(obj->handle, rbuf, *rbuflen);
-        dsi_writeflush(obj->handle);
+        dsi_writeinit(obj->dsi, rbuf, *rbuflen);
+        dsi_writeflush(obj->dsi);
     }
     if (err != AFP_OK) {
         *rbuflen = 0;