Skip to content

Commit

Permalink
debug:001
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Jun 23, 2024
1 parent 34d08cf commit d9290b3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions amalgamation/toxcore_amalgamation.c
Original file line number Diff line number Diff line change
Expand Up @@ -32469,6 +32469,12 @@ int gc_get_savedpeer_public_key_by_slot_number(const GC_Chat *chat, uint32_t slo
const int peernumber = get_peer_number_of_enc_pk(chat, saved_peer->public_key, true);
if (peernumber < 0) {
memcpy(public_key, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE);
// DEBUG ---------------------
char key_bin[ENC_PUBLIC_KEY_SIZE + 1];
memset(key_bin, 0, ENC_PUBLIC_KEY_SIZE + 1);
memcpy(key_bin, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE);
printf("k:%s slot:%d\n", key_bin, (int)slot_number);
// DEBUG ---------------------
return 0;
}
}
Expand Down
6 changes: 6 additions & 0 deletions amalgamation/toxcore_amalgamation_no_toxav.c
Original file line number Diff line number Diff line change
Expand Up @@ -29969,6 +29969,12 @@ int gc_get_savedpeer_public_key_by_slot_number(const GC_Chat *chat, uint32_t slo
const int peernumber = get_peer_number_of_enc_pk(chat, saved_peer->public_key, true);
if (peernumber < 0) {
memcpy(public_key, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE);
// DEBUG ---------------------
char key_bin[ENC_PUBLIC_KEY_SIZE + 1];
memset(key_bin, 0, ENC_PUBLIC_KEY_SIZE + 1);
memcpy(key_bin, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE);
printf("k:%s slot:%d\n", key_bin, (int)slot_number);
// DEBUG ---------------------
return 0;
}
}
Expand Down
6 changes: 6 additions & 0 deletions toxcore/group_chats.c
Original file line number Diff line number Diff line change
Expand Up @@ -3616,6 +3616,12 @@ int gc_get_savedpeer_public_key_by_slot_number(const GC_Chat *chat, uint32_t slo
const int peernumber = get_peer_number_of_enc_pk(chat, saved_peer->public_key, true);
if (peernumber < 0) {
memcpy(public_key, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE);
// DEBUG ---------------------
char key_bin[ENC_PUBLIC_KEY_SIZE + 1];
memset(key_bin, 0, ENC_PUBLIC_KEY_SIZE + 1);
memcpy(key_bin, saved_peer->public_key, ENC_PUBLIC_KEY_SIZE);
printf("k:%s slot:%d\n", key_bin, (int)slot_number);
// DEBUG ---------------------
return 0;
}
}
Expand Down

0 comments on commit d9290b3

Please sign in to comment.