Преглед изворни кода

Fix comment in sample code

Dirk Ziegelmeier пре 9 година
родитељ
комит
a20cdc597a
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      doc/NO_SYS_SampleCode.c

+ 2 - 3
doc/NO_SYS_SampleCode.c

@@ -20,9 +20,9 @@ void eth_mac_irq()
 static err_t netif_output(struct netif *netif, struct pbuf *p)
 static err_t netif_output(struct netif *netif, struct pbuf *p)
 {
 {
   LINK_STATS_INC(link.xmit);
   LINK_STATS_INC(link.xmit);
-  MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p->tot_len);
 
 
   /* Update SNMP stats (only if you use SNMP) */
   /* Update SNMP stats (only if you use SNMP) */
+  MIB2_STATS_NETIF_ADD(netif, ifoutoctets, p->tot_len);
   int unicast = ((p->payload[0] & 0x01) == 0);
   int unicast = ((p->payload[0] & 0x01) == 0);
   if (unicast) {
   if (unicast) {
     MIB2_STATS_NETIF_INC(netif, ifoutucastpkts);
     MIB2_STATS_NETIF_INC(netif, ifoutucastpkts);
@@ -91,10 +91,9 @@ void main(void)
 
 
     if(p != NULL) {
     if(p != NULL) {
       LINK_STATS_INC(link.recv);
       LINK_STATS_INC(link.recv);
-  
+ 
       /* Update SNMP stats (only if you use SNMP) */
       /* Update SNMP stats (only if you use SNMP) */
       MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len);
       MIB2_STATS_NETIF_ADD(netif, ifinoctets, p->tot_len);
-
       int unicast = ((p->payload[0] & 0x01) == 0);
       int unicast = ((p->payload[0] & 0x01) == 0);
       if (unicast) {
       if (unicast) {
         MIB2_STATS_NETIF_INC(netif, ifinucastpkts);
         MIB2_STATS_NETIF_INC(netif, ifinucastpkts);