From 6d3149714f845ab81c32799767dc243f248291ad Mon Sep 17 00:00:00 2001 From: likewise Date: Thu, 3 Apr 2003 12:09:39 +0000 Subject: [PATCH] Print debug message before actually changing netif IP address config. --- src/core/netif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index f343988c..3c32edaf 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -177,37 +177,37 @@ netif_find(char *name) void netif_set_ipaddr(struct netif *netif, struct ip_addr *ipaddr) { - ip_addr_set(&(netif->ip_addr), ipaddr); DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting IP address of interface %c%c%u to %u.%u.%u.%u\n", netif->name[0], netif->name[1], netif->num, (u8_t)(ntohl(ipaddr->addr) >> 24 & 0xff), (u8_t)(ntohl(ipaddr->addr) >> 16 & 0xff), (u8_t)(ntohl(ipaddr->addr) >> 8 & 0xff), (u8_t)(ntohl(ipaddr->addr) & 0xff))); + ip_addr_set(&(netif->ip_addr), ipaddr); } /*-----------------------------------------------------------------------------------*/ void netif_set_gw(struct netif *netif, struct ip_addr *gw) { - ip_addr_set(&(netif->gw), gw); DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting GW address of interface %c%c%u to %u.%u.%u.%u\n", netif->name[0], netif->name[1], netif->num, (u8_t)(ntohl(gw->addr) >> 24 & 0xff), (u8_t)(ntohl(gw->addr) >> 16 & 0xff), (u8_t)(ntohl(gw->addr) >> 8 & 0xff), (u8_t)(ntohl(gw->addr) & 0xff))); + ip_addr_set(&(netif->gw), gw); } /*-----------------------------------------------------------------------------------*/ void netif_set_netmask(struct netif *netif, struct ip_addr *netmask) { - ip_addr_set(&(netif->netmask), netmask); DEBUGF(NETIF_DEBUG | DBG_TRACE | DBG_STATE, ("netif: setting netmask of interface %c%c%u to %u.%u.%u.%u\n", netif->name[0], netif->name[1], netif->num, (u8_t)(ntohl(netmask->addr) >> 24 & 0xff), (u8_t)(ntohl(netmask->addr) >> 16 & 0xff), (u8_t)(ntohl(netmask->addr) >> 8 & 0xff), (u8_t)(ntohl(netmask->addr) & 0xff))); + ip_addr_set(&(netif->netmask), netmask); } /*-----------------------------------------------------------------------------------*/ void