Changeset 48abdc31 in rtems


Ignore:
Timestamp:
08/23/99 14:58:16 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
72f9937b
Parents:
da0349c
Message:

Patch from Eric Norum <eric@…> to readd the behavior where
the minor number indicated the port number to try.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/libnetworking/lib/tftpDriver.c

    rda0349c r48abdc31  
    520520
    521521    tp->myAddress.sin_family = AF_INET;
    522     /*
    523      *  XXX Eric .. how do we get the minor information???
    524      * tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + minor);
    525      */
    526     tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try);
     522    tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + s);
    527523    tp->myAddress.sin_addr.s_addr = htonl (INADDR_ANY);
    528524    if (bind (tp->socket, (struct sockaddr *)&tp->myAddress, sizeof tp->myAddress) >= 0)
     
    530526    if (++retryCount == 10) {
    531527      close (tp->socket);
    532       /*
    533        *  XXX Eric .. how do we get the minor information to release this???
    534         releaseStream (minor);
    535        */
     528      releaseStream (s);
    536529      return EBUSY;
    537530    }
     
    555548     */
    556549    tp->pkbuf.tftpRWRQ.opcode = htons (TFTP_OPCODE_RRQ);
    557       /*
    558        *  XXX Eric .. is this cast taking the const off right?
    559        */
    560 
    561550    cp1 = (char *) tp->pkbuf.tftpRWRQ.filename_mode;
    562551    cp2 = (char *) remoteFilename;
     
    575564          sizeof tp->farAddress) < 0) {
    576565      close (tp->socket);
    577       /*
    578        *  XXX Eric .. how do we get the minor information to release this???
    579         releaseStream (minor);
    580        */
     566      releaseStream (s);
    581567      return EIO;
    582568    }
     
    596582        if (sendAck (tp) != 0) {
    597583          close (tp->socket);
    598       /*
    599        *  XXX Eric .. how do we get the minor information to release this???
    600           releaseStream (minor);
    601        */
    602 
     584          releaseStream (s);
    603585          return EIO;
    604586        }
     
    608590        tftpSetErrno (tp);
    609591        close (tp->socket);
    610       /*
    611        *  XXX Eric .. how do we get the minor information to release this???
    612        *  releaseStream (minor);
    613        */
     592        releaseStream (s);
    614593        return EIO;
    615594      }
     
    621600    if (++retryCount >= OPEN_RETRY_LIMIT) {
    622601      close (tp->socket);
    623       /*
    624        *  XXX Eric .. how do we get the minor information to release this???
    625         releaseStream (minor);
    626        */
     602      releaseStream (s);
    627603      return EIO;
    628604    }
  • c/src/lib/libnetworking/lib/tftpDriver.c

    rda0349c r48abdc31  
    520520
    521521    tp->myAddress.sin_family = AF_INET;
    522     /*
    523      *  XXX Eric .. how do we get the minor information???
    524      * tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + minor);
    525      */
    526     tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try);
     522    tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + s);
    527523    tp->myAddress.sin_addr.s_addr = htonl (INADDR_ANY);
    528524    if (bind (tp->socket, (struct sockaddr *)&tp->myAddress, sizeof tp->myAddress) >= 0)
     
    530526    if (++retryCount == 10) {
    531527      close (tp->socket);
    532       /*
    533        *  XXX Eric .. how do we get the minor information to release this???
    534         releaseStream (minor);
    535        */
     528      releaseStream (s);
    536529      return EBUSY;
    537530    }
     
    555548     */
    556549    tp->pkbuf.tftpRWRQ.opcode = htons (TFTP_OPCODE_RRQ);
    557       /*
    558        *  XXX Eric .. is this cast taking the const off right?
    559        */
    560 
    561550    cp1 = (char *) tp->pkbuf.tftpRWRQ.filename_mode;
    562551    cp2 = (char *) remoteFilename;
     
    575564          sizeof tp->farAddress) < 0) {
    576565      close (tp->socket);
    577       /*
    578        *  XXX Eric .. how do we get the minor information to release this???
    579         releaseStream (minor);
    580        */
     566      releaseStream (s);
    581567      return EIO;
    582568    }
     
    596582        if (sendAck (tp) != 0) {
    597583          close (tp->socket);
    598       /*
    599        *  XXX Eric .. how do we get the minor information to release this???
    600           releaseStream (minor);
    601        */
    602 
     584          releaseStream (s);
    603585          return EIO;
    604586        }
     
    608590        tftpSetErrno (tp);
    609591        close (tp->socket);
    610       /*
    611        *  XXX Eric .. how do we get the minor information to release this???
    612        *  releaseStream (minor);
    613        */
     592        releaseStream (s);
    614593        return EIO;
    615594      }
     
    621600    if (++retryCount >= OPEN_RETRY_LIMIT) {
    622601      close (tp->socket);
    623       /*
    624        *  XXX Eric .. how do we get the minor information to release this???
    625         releaseStream (minor);
    626        */
     602      releaseStream (s);
    627603      return EIO;
    628604    }
  • c/src/libnetworking/lib/tftpDriver.c

    rda0349c r48abdc31  
    520520
    521521    tp->myAddress.sin_family = AF_INET;
    522     /*
    523      *  XXX Eric .. how do we get the minor information???
    524      * tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + minor);
    525      */
    526     tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try);
     522    tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + s);
    527523    tp->myAddress.sin_addr.s_addr = htonl (INADDR_ANY);
    528524    if (bind (tp->socket, (struct sockaddr *)&tp->myAddress, sizeof tp->myAddress) >= 0)
     
    530526    if (++retryCount == 10) {
    531527      close (tp->socket);
    532       /*
    533        *  XXX Eric .. how do we get the minor information to release this???
    534         releaseStream (minor);
    535        */
     528      releaseStream (s);
    536529      return EBUSY;
    537530    }
     
    555548     */
    556549    tp->pkbuf.tftpRWRQ.opcode = htons (TFTP_OPCODE_RRQ);
    557       /*
    558        *  XXX Eric .. is this cast taking the const off right?
    559        */
    560 
    561550    cp1 = (char *) tp->pkbuf.tftpRWRQ.filename_mode;
    562551    cp2 = (char *) remoteFilename;
     
    575564          sizeof tp->farAddress) < 0) {
    576565      close (tp->socket);
    577       /*
    578        *  XXX Eric .. how do we get the minor information to release this???
    579         releaseStream (minor);
    580        */
     566      releaseStream (s);
    581567      return EIO;
    582568    }
     
    596582        if (sendAck (tp) != 0) {
    597583          close (tp->socket);
    598       /*
    599        *  XXX Eric .. how do we get the minor information to release this???
    600           releaseStream (minor);
    601        */
    602 
     584          releaseStream (s);
    603585          return EIO;
    604586        }
     
    608590        tftpSetErrno (tp);
    609591        close (tp->socket);
    610       /*
    611        *  XXX Eric .. how do we get the minor information to release this???
    612        *  releaseStream (minor);
    613        */
     592        releaseStream (s);
    614593        return EIO;
    615594      }
     
    621600    if (++retryCount >= OPEN_RETRY_LIMIT) {
    622601      close (tp->socket);
    623       /*
    624        *  XXX Eric .. how do we get the minor information to release this???
    625         releaseStream (minor);
    626        */
     602      releaseStream (s);
    627603      return EIO;
    628604    }
  • cpukit/libnetworking/lib/tftpDriver.c

    rda0349c r48abdc31  
    520520
    521521    tp->myAddress.sin_family = AF_INET;
    522     /*
    523      *  XXX Eric .. how do we get the minor information???
    524      * tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + minor);
    525      */
    526     tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try);
     522    tp->myAddress.sin_port = htons (UDP_PORT_BASE + nStreams * try + s);
    527523    tp->myAddress.sin_addr.s_addr = htonl (INADDR_ANY);
    528524    if (bind (tp->socket, (struct sockaddr *)&tp->myAddress, sizeof tp->myAddress) >= 0)
     
    530526    if (++retryCount == 10) {
    531527      close (tp->socket);
    532       /*
    533        *  XXX Eric .. how do we get the minor information to release this???
    534         releaseStream (minor);
    535        */
     528      releaseStream (s);
    536529      return EBUSY;
    537530    }
     
    555548     */
    556549    tp->pkbuf.tftpRWRQ.opcode = htons (TFTP_OPCODE_RRQ);
    557       /*
    558        *  XXX Eric .. is this cast taking the const off right?
    559        */
    560 
    561550    cp1 = (char *) tp->pkbuf.tftpRWRQ.filename_mode;
    562551    cp2 = (char *) remoteFilename;
     
    575564          sizeof tp->farAddress) < 0) {
    576565      close (tp->socket);
    577       /*
    578        *  XXX Eric .. how do we get the minor information to release this???
    579         releaseStream (minor);
    580        */
     566      releaseStream (s);
    581567      return EIO;
    582568    }
     
    596582        if (sendAck (tp) != 0) {
    597583          close (tp->socket);
    598       /*
    599        *  XXX Eric .. how do we get the minor information to release this???
    600           releaseStream (minor);
    601        */
    602 
     584          releaseStream (s);
    603585          return EIO;
    604586        }
     
    608590        tftpSetErrno (tp);
    609591        close (tp->socket);
    610       /*
    611        *  XXX Eric .. how do we get the minor information to release this???
    612        *  releaseStream (minor);
    613        */
     592        releaseStream (s);
    614593        return EIO;
    615594      }
     
    621600    if (++retryCount >= OPEN_RETRY_LIMIT) {
    622601      close (tp->socket);
    623       /*
    624        *  XXX Eric .. how do we get the minor information to release this???
    625         releaseStream (minor);
    626        */
     602      releaseStream (s);
    627603      return EIO;
    628604    }
Note: See TracChangeset for help on using the changeset viewer.