Changeset 7413
- Timestamp:
- 07/09/07 19:01:34 (6 years ago)
- Location:
- src/router
- Files:
-
- 12 edited
-
httpd/modules/broadcom.c (modified) (5 diffs)
-
kromo/cisco_wrt54g_en/common.js (modified) (2 diffs)
-
kromo/cisco_wrt54g_en/common_micro.js (modified) (2 diffs)
-
kromo/cisco_wrt54g_en/lang_pack/english.js (modified) (1 diff)
-
kromo/cisco_wrt54g_en/lang_pack/german.js (modified) (1 diff)
-
rc/services.c (modified) (1 diff)
-
services/networking/madwifi.c (modified) (1 diff)
-
services/networking/network.c (modified) (2 diffs)
-
services/services/vlantagging.c (modified) (4 diffs)
-
services/tools/site_survey_broadcom.c (modified) (2 diffs)
-
shared/utils.c (modified) (1 diff)
-
shared/wl.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/httpd/modules/broadcom.c
r7326 r7413 3510 3510 3511 3511 /** Apply **/ 3512 if (!strcmp (value, "Apply") )3512 if (!strcmp (value, "Apply") || !strcmp (value, "ApplyTake")) 3513 3513 { 3514 3514 struct apply_action *act; … … 3527 3527 "submit_button=[%s] service=[%s] sleep_time=[%d] action=[%d]\n", 3528 3528 act->name, act->service, act->sleep_time, act->action); 3529 3529 3530 if ((act->action == SYS_RESTART) 3530 3531 || (act->action == SERVICE_RESTART)) 3531 3532 nvram_set ("action_service", act->service); 3533 char *actionstack; 3534 int freeit=0; 3535 if (nvram_get("action_service")!=NULL) 3536 { 3537 actionstack = malloc(strlen(nvram_safe_get("action_service")) + strlen(act->service) + 2); 3538 sprintf(actionstack,"%s %s",nvram_safe_get("action_service"),act->service); 3539 freeit=0; 3540 } 3532 3541 else 3533 nvram_set ("action_service", ""); 3534 3542 { 3543 actionstack = nvram_get("action_service"); 3544 } 3545 nvram_set("action_service",actionstack); 3546 if (freeit) 3547 free(actionstack); 3535 3548 sleep_time = act->sleep_time; 3536 3549 action = act->action; … … 3541 3554 else 3542 3555 { 3543 nvram_set ("action_service", "");3556 //nvram_set ("action_service", ""); 3544 3557 sleep_time = 1; 3545 3558 action = RESTART; 3546 3559 } 3547 3560 3548 if (need_commit )3561 if (need_commit && !strcmp (value, "ApplyTake")) 3549 3562 { 3550 3563 diag_led (DIAG, STOP_LED); … … 3602 3615 3603 3616 footer: 3617 3604 3618 if (do_reboot) 3605 3619 action = REBOOT; … … 3608 3622 if (need_reboot) 3609 3623 action = REBOOT; 3624 3625 if (!strcmp (value, "ApplyTake")) 3626 { 3627 action=NOTHING; 3628 } 3610 3629 3611 3630 if (action != REBOOT) -
src/router/kromo/cisco_wrt54g_en/common.js
r6983 r7413 835 835 // Gray all form when submitting 836 836 function apply(form, text, delay) { 837 form.submit(); 838 } 839 function applytake(form, text, delay) { 840 form.action.value = "ApplyTake"; 837 841 if(!text) 838 842 text=errmsg.err100; … … 1085 1089 if(sub) 1086 1090 document.write("<input class=\"button\" type=\"button\" name=\"save_button\" value=\"" + sbutton.save + "\" onclick=\"to_submit(this.form);\" />"); 1091 if(sub) 1092 document.write("<input class=\"button\" type=\"button\" name=\"apply_button\" value=\"" + sbutton.apply + "\" onclick=\"applytake(this.form);\" />"); 1087 1093 if(res) 1088 1094 document.write("<input class=\"button\" type=\"button\" name=\"reset_button\" value=\"" + sbutton.cancel + "\" onclick=\"window.location.reload();\" />"); -
src/router/kromo/cisco_wrt54g_en/common_micro.js
r6983 r7413 818 818 function apply(form) { 819 819 form.submit(); 820 } 821 822 function applytake(form) { 823 form.action.value="ApplyTake"; 824 form.submit(); 820 825 for (i = 0; i < form.elements.length; i++) { 821 826 if(defined(form.elements[i].disabled)) … … 1005 1010 if(sub) 1006 1011 document.write("<input class=\"button\" type=\"button\" name=\"save_button\" value=\"" + sbutton.save + "\" onclick=\"to_submit(this.form);\" />"); 1012 if(sub) 1013 document.write("<input class=\"button\" type=\"button\" name=\"apply_button\" value=\"" + sbutton.apply + "\" onclick=\"applytake(this.form);\" />"); 1007 1014 if(res) 1008 1015 document.write("<input class=\"button\" type=\"button\" name=\"reset_button\" value=\"" + sbutton.cancel + "\" onclick=\"window.location.reload();\" />"); -
src/router/kromo/cisco_wrt54g_en/lang_pack/english.js
r7291 r7413 164 164 165 165 var sbutton = new Object(); 166 sbutton.save="Save Settings"; 166 sbutton.save="Save"; 167 sbutton.apply="Apply Settings"; 167 168 sbutton.saving="Saved"; 168 169 sbutton.cmd="Executing"; -
src/router/kromo/cisco_wrt54g_en/lang_pack/german.js
r7291 r7413 137 137 share.user="Nutzer"; 138 138 139 sbutton.save="Einstellungen speichern"; 139 sbutton.save="Speichern"; 140 sbutton.apply="Übernehmen"; 140 141 sbutton.saving="Gespeichert"; 141 142 sbutton.cmd="Ausführen"; -
src/router/rc/services.c
r7266 r7413 269 269 kill (1, SIGHUP); 270 270 fprintf (stderr, "Action %s\n", service); 271 271 sleep(3); 272 272 cprintf ("Restart service=[%s]\n", service); 273 273 start_service ("overclocking"); -
src/router/services/networking/madwifi.c
r7404 r7413 1439 1439 int s; 1440 1440 1441 1442 1443 1441 char *m; 1444 1442 char *first = NULL; -
src/router/services/networking/network.c
r7376 r7413 1836 1836 br_shutdown (); 1837 1837 #endif 1838 eval("rm","/tmp/.ifcache"); 1838 1839 1839 1840 } … … 2834 2835 #endif 2835 2836 #endif 2837 eval("rm","/tmp/.ifcache"); 2836 2838 2837 2839 } -
src/router/services/services/vlantagging.c
r6759 r7413 23 23 sprintf (vlan_name, "%s.%s", tag, port); 24 24 eval ("ifconfig", vlan_name, "0.0.0.0", "up"); 25 eval("rm","/tmp/.ifcache"); 25 26 } 26 27 } … … 41 42 sprintf (vlan_name, "%s.%s", tag, port); 42 43 if (ifexists (vlan_name)) 44 { 43 45 eval ("vconfig", "rem", vlan_name); 46 eval("rm","/tmp/.ifcache"); 47 } 44 48 } 45 49 } … … 92 96 93 97 eval ("brctl", "addbr", tag); 98 eval("rm","/tmp/.ifcache"); 94 99 if (!strcmp (port, "On")) 95 100 br_set_stp_state (tag, 1); … … 205 210 eval ("ifconfig", tag, "down"); 206 211 eval ("brctl", "delbr", tag); 212 eval("rm","/tmp/.ifcache"); 207 213 } 208 214 } -
src/router/services/tools/site_survey_broadcom.c
r7325 r7413 299 299 300 300 /* can only scan in STA mode */ 301 //#ifndef HAVE_MSSID301 #ifndef HAVE_MSSID 302 302 wl_ioctl (dev, WLC_GET_AP, &oldap, sizeof (oldap)); 303 303 if (oldap > 0) 304 304 eval ("wl", "ap", "0"); 305 //#endif305 #endif 306 306 if (wl_ioctl (dev, WLC_SCAN, ¶ms, 64) < 0) 307 307 { … … 367 367 368 368 endss: 369 //#ifndef HAVE_MSSID369 #ifndef HAVE_MSSID 370 370 if (oldap > 0) 371 371 eval ("wl", "ap", "1"); 372 //#endif372 #endif 373 373 374 374 C_led (0); -
src/router/shared/utils.c
r7368 r7413 2715 2715 getIfList (char *buffer, char *ifprefix) 2716 2716 { 2717 FILE *in = fopen ("/proc/net/dev", "rb"); 2717 FILE *in = fopen("/tmp/.ifcache","rb"); 2718 if (in==NULL) 2719 { 2720 in = fopen("/proc/net/dev","rb"); 2721 FILE *tmp = fopen("/tmp/.ifcache","wb"); 2722 int c=getc(in); 2723 while(c!=EOF) 2724 { 2725 putc(c,tmp); 2726 c=getc(in); 2727 } 2728 fclose(tmp); 2729 fclose(in); 2730 in=fopen("/tmp/.ifcache","rb"); 2731 } 2718 2732 char ifname[32]; 2719 2733 //skip the first 2 lines -
src/router/shared/wl.c
r7384 r7413 673 673 char type[32]; 674 674 char netmode[32]; 675 unsigned int *count = (unsigned int *) list; 675 676 sprintf (type, "%s_mode",ifname); 676 677 sprintf (netmode, "%s_net_mode",ifname); … … 686 687 getAssocMAC (ifname,mac); 687 688 memcpy (&list[4], mac, 6); 689 count[0]=1; 688 690 mincount = 1; 689 691 } … … 693 695 fprintf (stderr, "socket(SOCK_DRAGM)\n"); 694 696 free (buf); 695 return -1; 697 mincount = 1; 698 return mincount; 696 699 } 697 700 (void) memset (&iwr, 0, sizeof (iwr)); … … 715 718 cp = buf; 716 719 unsigned char *l = (unsigned char *) list; 717 unsigned int *count = (unsigned int *) list;718 720 count[0] = 0; 719 721 l += 4;
Note: See TracChangeset
for help on using the changeset viewer.
