diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Messenger.c | 12 |
1 files changed, 6 insertions, 6 deletions
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) | |||
334 | { | 334 | { |
335 | uint8_t *thepacket = malloc(length + 1); | 335 | uint8_t *thepacket = malloc(length + 1); |
336 | memcpy(thepacket + 1, status, length); | 336 | memcpy(thepacket + 1, status, length); |
337 | thepacket[0] = 70; | 337 | thepacket[0] = 49; |
338 | int written = write_cryptpacket(friendlist[friendnumber].crypt_connection_id, thepacket, length + 1); | 338 | int written = write_cryptpacket(friendlist[friendnumber].crypt_connection_id, thepacket, length + 1); |
339 | free(thepacket); | 339 | free(thepacket); |
340 | return written; | 340 | return written; |
@@ -463,11 +463,7 @@ static void doFriends() | |||
463 | friendlist[i].name[MAX_NAME_LENGTH - 1] = 0;//make sure the NULL terminator is present. | 463 | friendlist[i].name[MAX_NAME_LENGTH - 1] = 0;//make sure the NULL terminator is present. |
464 | break; | 464 | break; |
465 | } | 465 | } |
466 | case 64: { | 466 | case 49: { |
467 | (*friend_message)(i, temp + 1, len - 1); | ||
468 | break; | ||
469 | } | ||
470 | case 70: { | ||
471 | uint8_t *status = calloc(MIN(len - 1, MAX_USERSTATUS_LENGTH), 1); | 467 | uint8_t *status = calloc(MIN(len - 1, MAX_USERSTATUS_LENGTH), 1); |
472 | memcpy(status, temp + 1, MIN(len - 1, MAX_USERSTATUS_LENGTH)); | 468 | memcpy(status, temp + 1, MIN(len - 1, MAX_USERSTATUS_LENGTH)); |
473 | friend_statuschange(i, status, MIN(len - 1, MAX_USERSTATUS_LENGTH)); | 469 | friend_statuschange(i, status, MIN(len - 1, MAX_USERSTATUS_LENGTH)); |
@@ -475,6 +471,10 @@ static void doFriends() | |||
475 | free(status); | 471 | free(status); |
476 | break; | 472 | break; |
477 | } | 473 | } |
474 | case 64: { | ||
475 | (*friend_message)(i, temp + 1, len - 1); | ||
476 | break; | ||
477 | } | ||
478 | } | 478 | } |
479 | } | 479 | } |
480 | else | 480 | else |