grahams (grahams) wrote in alivejournal,
grahams
grahams
alivejournal

  • Mood:
  • Music:

Productive night...

I had some friends over last night until 11pm, and after they left I started working on AliveJournal, and didn't let up until 4am. The end result, many crashers have been fixed. I would appreciate if y'all would test this binary

Here are the changes I made:


  • Created CommandBlockManager - people who are familiar with the code know that Simon (original author) created a cool class called ResponseBlockManager that puts the response from the LJ server in a convienient hashtable. I decided to take that and do the same thing for commands sent to the server. This class manages the name/value pairs that get sent to the server, and centralizes the memory management of these pairs.

    It works like this:

    CommandBlockManager *man = new CommandBlockManager();
    man->SetValue( "username", "foobie" );
    man->SetValue( "password", "pencil" );
    man->SetValue( "mode", "login" );
    ....
    SendCommand( man->GetCommandBlock() );


    And the GetCommandBlock generates the string:
    username=foobie&password=pencil&mode=login&....

    Since this makes the code so much cleaner I am hoping this eliminates all of the problems people have had communicating with the server... (note the word 'hope' :P)
  • Account Manager Fixed (finally!!) - I don't know if it was my code, or simon's code, but there was a sizeof() where there should have been a strlen(). No finger pointing necessary, it is fixed now. Honestly, I can't believe this didn't cause it to crash all the time. :)
  • Tons of little bugs fixed - Found a bunch of memory leaks, off-by-one errors, and the like. Now that this code is moving more towards my style from Simon's, and I am getting more intimate with all of it, I am seeing lots of things that are wrong with it, both bugs that were there when I picked up the code and bugs I introduced out of negligence or ignorance of the codebase.
Subscribe

  • This is a call...

    Hey ho campers, is anyone still out there? I'm going to be getting together a new build of AliveJournal. This one will use the head code from the…

  • Zeta build on the horizon

    Well, all you millions of people who still look at this journal... I have just got my unreleased AJ 1.62 to compile and post under Zeta NEO. This is…

  • More progress

    Well, I've got the client to have multiple, currently hard coded, servers. You also have the option to type your own... The ititial state is now…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 10 comments

  • This is a call...

    Hey ho campers, is anyone still out there? I'm going to be getting together a new build of AliveJournal. This one will use the head code from the…

  • Zeta build on the horizon

    Well, all you millions of people who still look at this journal... I have just got my unreleased AJ 1.62 to compile and post under Zeta NEO. This is…

  • More progress

    Well, I've got the client to have multiple, currently hard coded, servers. You also have the option to type your own... The ititial state is now…