Thread: [Reconnect working] Netgear Router N300 DGN2200v3
View Single Post
  #16  
Old 07.09.2012, 23:16
johnny20
Guest
 
Posts: n/a
Default

Sorry for the late reply, was busy last few days.

Quote:
Originally Posted by Freeloader View Post
Yes you understand this correctly, but the ID value will change when you hard reboot the router (power button or reboot button in interface), there fore the script will not function. This can also happen when the electricity goes off.
I'm not sure I understand what you're saying here... The reconnect script can either run automatically if some file host is making JD wait between downloads, or it can be run manually, right?

What I was suggesting was this:

Code:
1) Send GET request to RST_st_poe.htm with auth

2) Parse id URL parameter with RegEx and store in var num

3) Send POST request to setup.cgi with id parsed above and appropriate todo (disconnect) etc. parameters

4) Wait for x seconds

5) Send POST request to setup.cgi with id parsed above and appropriate todo (connect) etc. parameters

So even if there is a hard reboot or power loss, anyway we are getting id afresh once in step 2). What I was asking is, why do we need to a) send GET request to RST_st_poe.htm with auth, and b) parse id URL parameter with RegEx and store in var num, twice in the original script? Can't we do it only once at the start of the script, as shown above? Or is there some reason that we need to repeat these two steps before the connect also?

Quote:
Originally Posted by Freeloader View Post
Before the users commitment (upload process) JD will first verify the script > meaning it will perform a reconnection by executing the script. This will ensure that junk can not be uploaded to database.

So all in all without JDownloaders verification end user can not upload his/her script

After the script is added to database another user can use JDownloader reconnection wizard which can scan through the similar models until it finds a working script, and even if a working script is found > the end user still can continue (will have an option for) scanning for further scripts > as the reconnection wizard is also capable of finding faster reconnection scripts.
I think this is a really nice idea and the proposed implementation sounds great!

Quote:
Originally Posted by Freeloader View Post
Most of the headers within this script arent necessary but this doesnt mean that it doesnt work. Marked junk with bold, again it doesnt mean that it doesnt work.
Yes, I understand that these extra headers are unnecessary bloat and can be removed without affecting the actual working of the script. What I meant by "junk code" was that people could just write some wrong non-working script (by mistake or deliberately) and submit to the database. But above I see that this problem has been taken care of, since JD2 will run and verify the script before uploading it. So there is no problem at all here.
Reply With Quote