diff options
author | brian <brian@FreeBSD.org> | 1999-05-24 16:39:17 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-05-24 16:39:17 +0000 |
commit | c6862b32c09553d9e7dd35b372cd8c14d6f2cbd3 (patch) | |
tree | b8be473b5d7c5052d1cbdeb29b649e908e467308 /usr.sbin/ppp/udp.c | |
parent | 96fd7bde688afba4d5ecad71cff2b31f875067b3 (diff) | |
download | FreeBSD-src-c6862b32c09553d9e7dd35b372cd8c14d6f2cbd3.zip FreeBSD-src-c6862b32c09553d9e7dd35b372cd8c14d6f2cbd3.tar.gz |
Correct the ``ignoring sync/async'' warnings so that they show
up with the correct device type.
Reassign the correct tcpdevice or execdevice after transfering
a link in MP server mode.
Diffstat (limited to 'usr.sbin/ppp/udp.c')
-rw-r--r-- | usr.sbin/ppp/udp.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/usr.sbin/ppp/udp.c b/usr.sbin/ppp/udp.c index 548ed1b..38a82d4 100644 --- a/usr.sbin/ppp/udp.c +++ b/usr.sbin/ppp/udp.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: tcp.c,v 1.1 1999/05/08 11:07:45 brian Exp $ + * $Id: udp.c,v 1.1 1999/05/12 09:49:09 brian Exp $ */ #include <sys/types.h> @@ -135,21 +135,17 @@ struct device * udp_iov2device(int type, struct physical *p, struct iovec *iov, int *niov, int maxiov) { - struct device *dev; - if (type == UDP_DEVICE) { - /* It's one of ours ! Let's create the device */ + struct udpdevice *dev = (struct udpdevice *)iov[(*niov)++].iov_base; - dev = (struct device *)iov[(*niov)++].iov_base; /* Refresh function pointers etc */ - memcpy(dev, &baseudpdevice, sizeof *dev); - /* Remember, there's really more than (sizeof *dev) there */ + memcpy(&dev->dev, &baseudpdevice, sizeof dev->dev); - physical_SetupStack(p, PHYSICAL_FORCE_SYNC); - } else - dev = NULL; + physical_SetupStack(p, dev->dev.name, PHYSICAL_FORCE_SYNC); + return &dev->dev; + } - return dev; + return NULL; } static struct udpdevice * @@ -261,7 +257,7 @@ udp_Create(struct physical *p) if (dev) { memcpy(&dev->dev, &baseudpdevice, sizeof dev->dev); - physical_SetupStack(p, PHYSICAL_FORCE_SYNC); + physical_SetupStack(p, dev->dev.name, PHYSICAL_FORCE_SYNC); return &dev->dev; } |