See Http://thedailywtf.com/forums/65091/ShowPost.aspx in the original
Here is the code written by the good-hearted programmer.
/* This piece of code sucks. It's really bad. I honestly admit that my code sucks. If you are an employee of Intertrode Communications Corporation *. I am very, very sorry that you have to maintain this code. I'm going to rewrite this piece of code tomorrow, but I'm forgetful. I often forget the code I wrote.
This code, for example, is the product of my forgetfulness. * * The ins and outs of things are like this.
I can't remember. AccountId (account number) Why this variable has no value set. * I checked the code again and again. Just don't understand. Now I have to leave. Fortunately, I found that I could catch accountid from the debug log (Debugging * log). Maybe it's just that the problem has been fixed.
Figure out when AccountId is emptied. * * Finally, please accept my sincere apology again * * * if ((AccountId = = NULL) | |
(AccountId = = "") | | (serversesion["AccountId"] = = NULL) | |
(serversesion["AccountId"] = = ""))
{//open session logs FileHandle file = F_open (Log_path + "/sessionlog-" + Log_file_date + ". LOG", 1);
while (file! = NULL) {tstring line = f_readline (file);
Look for IP and Changereg if ((Sfind (line,remote_addr)! =-1) && (Sfind (line, "Changereg")! =-1)) { 0000-00-00 00:00/accountmaint/changereg/? accountid=123456 255.255.255.255 ...//* AccountId = subst
R (Line, 52, 6); } if (f_eof (file)) {f_close (file); file = NULL; }
}
}