diff -Bur 1817/router/httpd/variables.c 1819/router/httpd/variables.c --- 1817/router/httpd/variables.c 2004-08-09 07:44:37.000000000 +0400 +++ 1819/router/httpd/variables.c 2004-08-11 06:32:17.000000000 +0400 @@ -620,10 +620,18 @@ {"qos_priority_x", "7", validate_range, ARGV("0","65535"), FALSE, 0x0}, - {"qos_maxbw_x", "9", validate_string, ARGV(""), FALSE, 0x0}, + {"qos_maxbw_x", "9", validate_range, ARGV("0", "65535"), FALSE, 0x0}, - {"qos_minbw_x", "8", validate_string, ARGV(""), FALSE, 0x0}, - + {"qos_minbw_x", "9", validate_range, ARGV("0", "65535"), FALSE, 0x0}, + + {"qos_dir_x", "4", validate_choice, ARGV( + + "Up", + + "Down", + + 0), FALSE, 0x0}, + {0,0,0,0,0} }; @@ -2241,15 +2249,13 @@ {"qos_enable_x", "", validate_range, ARGV("0","1"), FALSE, FALSE}, - {"qos_maxup_x", "", validate_range, ARGV("0","65535"), FALSE, FALSE}, - {"qos_rulenum_x", "", validate_range, ARGV("0","65535"), FALSE, FALSE}, {"x_FUserList", "Group", validate_group, ARGV(variables_PrinterStatus_x_FUserList, "32", "59", "usb_ftpnum_x"), FALSE, FALSE}, {"x_FBanIPList", "Group", validate_group, ARGV(variables_PrinterStatus_x_FBanIPList, "16", "24", "usb_bannum_x"), FALSE, FALSE}, - {"x_QRuleList", "Group", validate_group, ARGV(variables_PrinterStatus_x_QRuleList, "8", "57", "qos_rulenum_x"), FALSE, FALSE}, + {"x_QRuleList", "Group", validate_group, ARGV(variables_PrinterStatus_x_QRuleList, "8", "61", "qos_rulenum_x"), FALSE, FALSE}, { 0, 0, 0, 0, 0, 0} }; diff -Bur 1817/router/LPRng/src/common/lpd.c 1819/router/LPRng/src/common/lpd.c --- 1817/router/LPRng/src/common/lpd.c 2004-06-07 04:41:17.000000000 +0400 +++ 1819/router/LPRng/src/common/lpd.c 2004-08-26 07:56:37.000000000 +0400 @@ -13,6 +13,7 @@ #include #include "wlancom.h" #include "lp_asus.h" +#include "syslog.h" //JY #include "lp.h" @@ -75,7 +76,7 @@ if((sockfd = socket(AF_INET,SOCK_STREAM,0)) < 0 ) { - perror("can't open stream socket:"); + //perror("can't open stream socket:"); exit(0); } @@ -87,7 +88,7 @@ if(bind(sockfd,(struct sockaddr *)&serv_addr , sizeof(serv_addr)) < 0 ) { - perror("can't bind:"); + //perror("can't bind:"); exit(0); } /*JY1111*/ @@ -104,7 +105,7 @@ fclose(pidfileread); } else{ - printf("another lpd daemon exists!!\n"); + //printf("another lpd daemon exists!!\n"); fclose(pidfileread); exit(0); } @@ -129,7 +130,7 @@ #ifdef LPR_with_ASUS//JY1112 if((sockfd_ASUS = socket(AF_INET,SOCK_STREAM,0)) < 0 ) { - perror("can't open stream socket:"); + //perror("can't open stream socket:"); exit(0); } bzero((char *)&serv_addr_ASUS , sizeof(serv_addr_ASUS)); @@ -139,7 +140,7 @@ if(bind(sockfd_ASUS,(struct sockaddr *)&serv_addr_ASUS , sizeof(serv_addr_ASUS)) < 0 ) { - perror("can't bind:"); + //perror("can't bind:"); exit(0); } @@ -176,17 +177,17 @@ LPRflag = 1; clisockfd = accept(sockfd,(struct sockaddr *)&cli_addr, &clilen); //JY1120 - printf("LPR sock received...\n");//JY1114: delete + //printf("LPR sock received...\n");//JY1114: delete } else if(FD_ISSET(sockfd_ASUS, &rfds)) { LPRflag = 0; clisockfd = accept(sockfd_ASUS,(struct sockaddr *)&cli_addr, &clilen); //JY1120 - printf("ASUSRemote port sock receved...\n");//JY1114: delete + //printf("ASUSRemote port sock receved...\n");//JY1114: delete } else{ - perror("lpr: no data received..."); + //perror("lpr: no data received..."); continue; } @@ -196,7 +197,7 @@ strcpy(clientaddr , inet_ntoa(cli_addr.sin_addr)); if(clisockfd < 0) { - perror("accept error:"); + //perror("accept error:"); continue; } @@ -204,7 +205,7 @@ if( (childpid = fork() ) < 0) { - perror("fork error:"); + //perror("fork error:"); } else if(childpid == 0) { @@ -224,10 +225,12 @@ // processReq(clisockfd); //#endif //PRINT("client exit\n"); +#ifdef REMOVE if(LPRflag) printf("LPR client exit\n");//JY1113delete else printf("ASUS Remote client exit\n");//JY1113delete +#endif // check_prn_status(ONLINE, ""); close(sockfd);// close(sockfd_ASUS);// @@ -298,11 +301,11 @@ if( rcv < 1) { //receive error - PRINT("1. rcv -> %d\n",rcv); + //PRINT("1. rcv -> %d\n",rcv); if(rcv < 0) { - perror("ERR:"); + //perror("ERR:"); } closesocket(sockfd); @@ -388,13 +391,13 @@ (void *)para_buf = malloc(pHdrCmd->ParaLength); } - PRINT("HdrCmd Length %d\n", iCount); + //PRINT("HdrCmd Length %d\n", iCount); // para_buf may be NULL but this command still work // 2004/06/07 by Joey if(iCount!=0 && para_buf == NULL) { - perror("malloc error 1:"); + //perror("malloc error 1:"); closesocket(sockfd); if(chPortOpened == TRUE) { @@ -410,7 +413,7 @@ if( rcv < 1) { //receive error - perror("2. RECV ERR:"); + //perror("2. RECV ERR:"); closesocket(sockfd); free(para_buf); if(chPortOpened == TRUE) @@ -468,8 +471,8 @@ if(fdPRN == 0) { //Failed to open printer port - PRINT("Can not open lp0 errno -> %d \n",errno); - perror("ERR:"); + //PRINT("Can not open lp0 errno -> %d \n",errno); + //perror("ERR:"); //Send header send(sockfd , (const char *)&pktRes , sizeof(pktRes) , 0); @@ -510,7 +513,7 @@ } else { - perror("Open status file failed: "); + //perror("Open status file failed: "); } chPortOpened = TRUE; @@ -623,7 +626,7 @@ if(pReadbuf == NULL) { - perror("malloc error 2:"); + //perror("malloc error 2:"); closesocket(sockfd); free(para_buf); if(chPortOpened == TRUE) @@ -694,7 +697,7 @@ if(iCount!=0 && para_buf == NULL) { - perror("malloc error 3:"); + //perror("malloc error 3:"); closesocket(sockfd); if(chPortOpened == TRUE) { @@ -703,7 +706,7 @@ return(0); } - PRINT("DATA HDR OK...\n"); + //PRINT("DATA HDR OK...\n"); while( iCount > 0 ) { @@ -712,7 +715,7 @@ if( rcv < 1) { //receive error - perror("3. RECV ERR:"); + //perror("3. RECV ERR:"); closesocket(sockfd); free(para_buf); if(chPortOpened == TRUE) @@ -905,7 +908,7 @@ } else { - perror("Open status file failed: "); + //perror("Open status file failed: "); } @@ -1023,16 +1026,16 @@ //PRINT("token[0] %d\n",token[0]); -printf("token=%s\n", token);//JY1104 +//printf("token=%s\n", token);//JY1104 if(token[0] == '0') { g_useUsb = TRUE; -printf("USB\n");//JY1112: delete +//printf("USB\n");//JY1112: delete } else { g_useUsb = FALSE; -printf("PARALLEL\n");//JY1112: delete +//printf("PARALLEL\n");//JY1112: delete } return(g_useUsb);//JY: 1104 break; @@ -1084,7 +1087,9 @@ index1[0] = 0; rps_i = 0; strcpy(QueueName_got, input); - return(strcmp(QueueName_got, "LPRServer")); + //return(strcmp(QueueName_got, "LPRServer")); + //by pass queue Name Check + return 0; } /*JY1120: send ack*/ @@ -1093,7 +1098,9 @@ char buffertosend[SMALLBUFFER]; buffertosend[0] = ack; buffertosend[1] = 0; - printf("send_ack_packet...\n");//JY1120: delete + //printf("send_ack_packet...\n");//JY1120: delete if( write( *talk, buffertosend, strlen(buffertosend) ) < 0 ) - printf("send_ack_packet: can not write socket...\n"); + { + //printf("send_ack_packet: can not write socket...\n"); + } } diff -Bur 1817/router/LPRng/src/include/lp.h 1819/router/LPRng/src/include/lp.h --- 1817/router/LPRng/src/include/lp.h 2004-05-04 08:10:18.000000000 +0400 +++ 1819/router/LPRng/src/include/lp.h 2004-08-26 07:11:26.000000000 +0400 @@ -482,4 +482,5 @@ #define FALSE 0 #define TRUE 1 #define ONLINE "On-line" -// \ No newline at end of file +#define printf(fmt, args...) +// diff -Bur 1817/router/Makefile 1819/router/Makefile --- 1817/router/Makefile 2004-08-09 17:22:57.000000000 +0400 +++ 1819/router/Makefile 2004-08-27 15:16:46.000000000 +0400 @@ -363,6 +363,7 @@ make image-$* LANGUAGE="EN" #make image-$* LANGUAGE="KR" make image-$* LANGUAGE="TW" + make image-$* LANGUAGE="CN" images: make images-WL500gx diff -Bur 1817/router/mipsel-uclibc/version.conf 1819/router/mipsel-uclibc/version.conf --- 1817/router/mipsel-uclibc/version.conf 2004-08-05 13:56:41.000000000 +0400 +++ 1819/router/mipsel-uclibc/version.conf 2004-08-26 08:07:09.000000000 +0400 @@ -1,6 +1,6 @@ # Version Information used by addver in image section of Makefile KERNEL_VER="1.8" -FS_VER="1.7" +FS_VER="1.9" PRODUCTID="WL500gx" HWL1="0.02" HWH1="2.99" diff -Bur 1817/router/rc/services_ex.c 1819/router/rc/services_ex.c --- 1817/router/rc/services_ex.c 2004-08-03 09:53:45.000000000 +0400 +++ 1819/router/rc/services_ex.c 2004-08-19 16:42:33.000000000 +0400 @@ -586,7 +586,7 @@ pid_t pid; sleep(1); - _eval(lpd_argv, NULL, 0, &pid); + _eval(lpd_argv, ">/dev/null", 0, &pid); } #endif #ifdef WEBCAM_SUPPORT @@ -841,7 +841,7 @@ //*arg++="-d"; //*arg++="7"; - _eval(rcamd_argv, NULL, 0, &pid); + _eval(rcamd_argv, ">/dev/null", 0, &pid); mkdir("/tmp/webcam", 0777); chdir("/tmp/webcam"); diff -Bur 1817/router/rcamdmips/rcamd.c 1819/router/rcamdmips/rcamd.c --- 1817/router/rcamdmips/rcamd.c 2004-07-07 10:49:21.000000000 +0400 +++ 1819/router/rcamdmips/rcamd.c 2004-08-18 10:21:39.000000000 +0400 @@ -100,6 +100,9 @@ int sockfd = -1; GList *clients; int newclient = 1; +int idletimeout = 0; +int is_grabed=0; +int first_grabed=0; pthread_mutex_t clients_lock; pthread_t server_thread; @@ -533,11 +536,13 @@ Compress it and signal sender to send it off... */ #ifdef WL600 - if ((diff = compare_images(image->data[cur], image->data[last], image->vmap.width, image->vmap.height))>max_count || newclient) + if ((diff = compare_images(image->data[cur], image->data[last], image->vmap.width, image->vmap.height))>max_count || newclient || idletimeout>5) #else - if ((diff = compare_images(image->data[cur], image->data[last], image->vmap.width, image->vmap.height))>max_diff || newclient) + if ((diff = compare_images(image->data[cur], image->data[last], image->vmap.width, image->vmap.height))>max_diff || newclient || idletimeout>5) #endif { + idletimeout = 0; + if (newclient) newclient = 0; @@ -604,6 +609,7 @@ } else { if (debug>1) printf("not different enough %d %d\n", cur, last); + idletimeout++; } #ifdef WL600 //printf("Alert? : %x %x %x\n", tmp_alertflag, alertstart, watchdogpid); @@ -988,7 +994,17 @@ } if (debug) printf("Status: %d %d %d\n", tmp_alertflag, alertstart, alertcount); #endif - if (!grab_image( &gCamera )) break; + if (!grab_image( &gCamera )) + { + is_grabed=0; + if (!first_grabed) break; + } + else + { + first_grabed=1; + is_grabed=1; + } + process_image( &gCamera ); //printf("End of process image outside\n"); curTime = g_timer_elapsed(gCamera.timer, NULL); diff -Bur 1817/router/shared/flash.default 1819/router/shared/flash.default --- 1817/router/shared/flash.default 2004-08-09 07:44:28.000000000 +0400 +++ 1819/router/shared/flash.default 2004-08-11 06:07:10.000000000 +0400 @@ -439,8 +439,6 @@ {"qos_enable_x", "0", 0}, -{"qos_maxup_x", "0", 0}, - {"qos_rulenum_x", "0", 0}, {"usb_ftpusername_x", "", 0}, @@ -462,3 +460,5 @@ {"qos_maxbw_x", "", 0}, {"qos_minbw_x", "", 0}, + +{"qos_dir_x", "", 0}, diff -Bur 1817/router/www/asus/mkweb 1819/router/www/asus/mkweb --- 1817/router/www/asus/mkweb 2004-08-06 17:45:49.000000000 +0400 +++ 1819/router/www/asus/mkweb 2004-08-27 15:15:04.000000000 +0400 @@ -48,6 +48,15 @@ MODELID="$MODEL" rm -rf ./web cp -rf ./web_asus_tw ./web + elif [ "$2" = "CN" ]; then + if [ "$MODEL" = "WL500bv2" ]; then + MODEL_STR="WL500b" + else + MODEL_STR="$MODEL" + fi + MODELID="$MODEL" + rm -rf ./web + cp -rf ./web_asus_cn ./web else MODEL_STR="$2" MODELID="$3" diff -Bur 1817/router/www/asus/web_asus_en/Advanced_QOS_Content.asp 1819/router/www/asus/web_asus_en/Advanced_QOS_Content.asp --- 1817/router/www/asus/web_asus_en/Advanced_QOS_Content.asp 2004-08-09 09:56:53.000000000 +0400 +++ 1819/router/www/asus/web_asus_en/Advanced_QOS_Content.asp 2004-08-19 03:48:38.000000000 +0400 @@ -28,10 +28,6 @@ Enable QoS? >Yes>No - -WAN Port UP Stream Limitation? - " onBlur="validate_range(this, 0, 65535)" onKeyPress="return is_number(this)"> - @@ -74,10 +70,11 @@ Priority Max. Min. + Dir. - + " readonly="1">
- +
- +
diff -Bur 1817/router/www/asus/web_asus_en/Basic_GOperation_Content.asp 1819/router/www/asus/web_asus_en/Basic_GOperation_Content.asp --- 1817/router/www/asus/web_asus_en/Basic_GOperation_Content.asp 2004-08-09 09:56:53.000000000 +0400 +++ 1819/router/www/asus/web_asus_en/Basic_GOperation_Content.asp 2004-08-19 03:48:38.000000000 +0400 @@ -142,7 +142,7 @@ MAC Address:" onBlur="return validate_hwaddr(this)" onKeyPress="return is_hwaddr()"> -HearBeat Server:"> +Heart-Beat Server:"> diff -Bur 1817/router/www/asus/web_asus_en/Basic_ROperation_Content.asp 1819/router/www/asus/web_asus_en/Basic_ROperation_Content.asp --- 1817/router/www/asus/web_asus_en/Basic_ROperation_Content.asp 2004-08-09 09:56:53.000000000 +0400 +++ 1819/router/www/asus/web_asus_en/Basic_ROperation_Content.asp 2004-08-19 03:48:38.000000000 +0400 @@ -142,7 +142,7 @@ MAC Address:" onBlur="return validate_hwaddr(this)" onKeyPress="return is_hwaddr()"> -HearBeat Server:"> +Heart-Beat Server:"> diff -Bur 1817/router/www/asus/web_asus_en/general.js 1819/router/www/asus/web_asus_en/general.js --- 1817/router/www/asus/web_asus_en/general.js 2004-08-09 09:56:56.000000000 +0400 +++ 1819/router/www/asus/web_asus_en/general.js 2004-08-19 03:48:41.000000000 +0400 @@ -1063,8 +1063,8 @@ if (o.value.length==0) return true; - prev = 0; - num = 0; + prev = -1; + num = -1; for(i=0; i='0'&&c<='9') { + if(num==-1) num=0; num = num*10 + (c-'0'); } else { - if (num>65535 || (c!=':' && c!='>' && c!='<')) + if (num>65535 || num==0 || (c!=':' && c!='>' && c!='<')) { alert(num + ' is not a valid port number!'); o.value = ""; o.focus(); return false; } - prev = num; - num = 0; + if (c=='>') prev = -2; + else if (c=='<') prev = -3; + else + { + prev = num; + num = 0; + } } } - if (num>65535 || (prev>num)) + if ((num>65535 && prev!=-3) || (num<1&&prev!=-2) || (prev>num) || (num>=65535&&prev==-2) || (num<=1&&prev==-3)) { if (num>65535) alert(num + ' is not a valid port number!'); else - alert(o.value + ' is not a valid port number!range'); + alert(o.value + ' is not a valid port range!'); o.value = ""; o.focus(); return false; } - else o.value = num; - + else + { + if (prev==-2) + { + if (num==65535) o.value = num; + else o.value = (num+1) + ":65535"; + } + else if (prev==-3) + { + if (num==1) o.value = num; + else o.value = "1:" + (num-1); + } + else if (prev!=-1) o.value = prev + ":" + num; + else o.value = num; + } return true; } diff -Bur 1817/router/www/asus/web_asus_tw/Advanced_QOS_Content.asp 1819/router/www/asus/web_asus_tw/Advanced_QOS_Content.asp --- 1817/router/www/asus/web_asus_tw/Advanced_QOS_Content.asp 2004-08-09 09:57:08.000000000 +0400 +++ 1819/router/www/asus/web_asus_tw/Advanced_QOS_Content.asp 2004-08-19 03:49:08.000000000 +0400 @@ -28,10 +28,6 @@ 啟用 QoS ? >Yes>No - -對外傳輸最大頻寬: - " onBlur="validate_range(this, 0, 65535)" onKeyPress="return is_number(this)"> - @@ -74,10 +70,11 @@ 順序 最大 最小 + PrinterStatus_x_QDir_itemname - + " readonly="1">
- +
- +
diff -Bur 1817/router/www/asus/web_asus_tw/general.js 1819/router/www/asus/web_asus_tw/general.js --- 1817/router/www/asus/web_asus_tw/general.js 2004-08-09 09:57:04.000000000 +0400 +++ 1819/router/www/asus/web_asus_tw/general.js 2004-08-19 03:49:05.000000000 +0400 @@ -1063,8 +1063,8 @@ if (o.value.length==0) return true; - prev = 0; - num = 0; + prev = -1; + num = -1; for(i=0; i='0'&&c<='9') { + if(num==-1) num=0; num = num*10 + (c-'0'); } else { - if (num>65535 || (c!=':' && c!='>' && c!='<')) + if (num>65535 || num==0 || (c!=':' && c!='>' && c!='<')) { alert(num + ' 不是有效的通訊埠編號!'); o.value = ""; o.focus(); return false; } - prev = num; - num = 0; + if (c=='>') prev = -2; + else if (c=='<') prev = -3; + else + { + prev = num; + num = 0; + } } } - if (num>65535 || (prev>num)) + if ((num>65535 && prev!=-3) || (num<1&&prev!=-2) || (prev>num) || (num>=65535&&prev==-2) || (num<=1&&prev==-3)) { if (num>65535) alert(num + ' 不是有效的通訊埠編號!'); else - alert(o.value + ' 不是有效的通訊埠編號!range'); + alert(o.value + ' 不是有效的通訊埠範圍!'); o.value = ""; o.focus(); return false; } - else o.value = num; - + else + { + if (prev==-2) + { + if (num==65535) o.value = num; + else o.value = (num+1) + ":65535"; + } + else if (prev==-3) + { + if (num==1) o.value = num; + else o.value = "1:" + (num-1); + } + else if (prev!=-1) o.value = prev + ":" + num; + else o.value = num; + } return true; }