Menu

#42 AIM message sent from SprintPCS phone less than 7 chars=null

open
AIM Module (5)
5
2005-01-12
2005-01-12
Anonymous
No

Sending a message from AIM which is less than 7 chars field length
causes the message to show up as null.
Anything 7 or over is recieved fine.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Sending less than 7 chars from the AOL chat agent is never a problem
    because there is HTML wrapped around the text that causes it to be
    greater than 7 anyways.
    If clients dont wrap HTMl around the message, then they need to send
    atleast a minimum of 7 chars otherwise the message does not get parsed
    by TLV.getData.
    Incidentally looking at the ServerICBM class i find that the
    TLV_PARTIAL_OFFSET = MSG_COOKIE_LEN+7.
    I wonder if the 7 has something to do with the 7 minimum.

     
  • Nobody/Anonymous

    Logged In: NO

    Sending less than 7 chars from the AOL chat agent is never a problem
    because there is HTML wrapped around the text that causes it to be
    greater than 7 anyways.
    If clients dont wrap HTMl around the message, then they need to send
    atleast a minimum of 7 chars otherwise the message does not get parsed
    by TLV.getData.
    Incidentally looking at the ServerICBM class i find that the
    TLV_PARTIAL_OFFSET = MSG_COOKIE_LEN+7.
    I wonder if the 7 has something to do with the 7 minimum.

     
  • Nobody/Anonymous

    Logged In: NO

    This is the temp fixed that i came up with, that seems to work
    In the hamsam.protocol.aim.command.ServerICBM class i replaced the
    line
    tlvList = TLV.getTLVs(data, tlvOffset);
    with
    byte[] newData = new byte[data.length+7];
    for (int i=0;i<data.length;i++) {
    newData[i]=data[i];
    }
    tlvList = TLV.getTLVs(newData, tlvOffset);

    Basically i increased the byte array by 7 bytes. It seems to fix the
    problem and did not break anything so far.

     
  • Nobody/Anonymous

    Logged In: NO

    This is the temp fixed that i came up with, that seems to work
    In the hamsam.protocol.aim.command.ServerICBM class i replaced the
    line
    tlvList = TLV.getTLVs(data, tlvOffset);
    with
    byte[] newData = new byte[data.length+7];
    for (int i=0;i<data.length;i++) {
    newData[i]=data[i];
    }
    tlvList = TLV.getTLVs(newData, tlvOffset);

    Basically i increased the byte array by 7 bytes. It seems to fix the
    problem and did not break anything so far.

     

Log in to post a comment.