Changeset 10948


Ignore:
Timestamp:
11/19/08 02:39:19 (5 years ago)
Author:
BrainSlayer
Message:

fixup issue if multiple lan interfaces exist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/visuals/dd-wrt.c

    r10921 r10948  
    75627562 
    75637563    char *lanifs = nvram_safe_get( "lan_ifnames" ); 
    7564     char tmp[128]; 
    7565     char *lanif; 
    7566  
    7567     if( strlen( lanifs ) != 0 ) 
    7568     { 
    7569         strcpy( tmp, lanifs ); 
    7570         lanif = strtok( tmp, " " ); 
    7571         websWrite( wp, "<option value=\"%s\" %s >LAN</option>\n", 
    7572                    lanif, nvram_match( "rflow_if", 
    7573                                        lanif ) ? "selected=\"selected\"" : 
    7574                    "" ); 
    7575     } 
     7564    char *next; 
     7565    char var[80]; 
     7566 
     7567    foreach( var, lanifs, next ) 
     7568    { 
     7569        if (nvram_match("wan_ifname",var)) 
     7570            continue; 
     7571        if (!ifexists(var)) 
     7572            continue; 
     7573        websWrite( wp, "<option value=\"%s\" %s >%s</option>\n", 
     7574                   var, nvram_match( "rflow_if", 
     7575                                       var ) ? "selected=\"selected\"" : 
     7576                   "",var ); 
     7577    } 
     7578 
    75767579 
    75777580    websWrite( wp, "<option value=\"%s\" %s >WLAN</option>\n", 
Note: See TracChangeset for help on using the changeset viewer.