From c8d7044efb35a9d9b241adbe8346492965e0b054 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 18 Jul 2013 15:59:14 -0400 Subject: Status packet is now id 49 (It's cleaner that way). --- core/Messenger.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/Messenger.c') diff --git a/core/Messenger.c b/core/Messenger.c index 8e22f448..2b9644a3 100644 --- a/core/Messenger.c +++ b/core/Messenger.c @@ -334,7 +334,7 @@ static int send_userstatus(int friendnumber, uint8_t * status, uint16_t length) { uint8_t *thepacket = malloc(length + 1); memcpy(thepacket + 1, status, length); - thepacket[0] = 70; + thepacket[0] = 49; int written = write_cryptpacket(friendlist[friendnumber].crypt_connection_id, thepacket, length + 1); free(thepacket); return written; @@ -463,11 +463,7 @@ static void doFriends() friendlist[i].name[MAX_NAME_LENGTH - 1] = 0;//make sure the NULL terminator is present. break; } - case 64: { - (*friend_message)(i, temp + 1, len - 1); - break; - } - case 70: { + case 49: { uint8_t *status = calloc(MIN(len - 1, MAX_USERSTATUS_LENGTH), 1); memcpy(status, temp + 1, MIN(len - 1, MAX_USERSTATUS_LENGTH)); friend_statuschange(i, status, MIN(len - 1, MAX_USERSTATUS_LENGTH)); @@ -475,6 +471,10 @@ static void doFriends() free(status); break; } + case 64: { + (*friend_message)(i, temp + 1, len - 1); + break; + } } } else -- cgit v1.2.3