Fix typo.

This commit is contained in:
AZ Huang 2013-11-29 23:38:06 +08:00
parent 8419d3469a
commit 2cb7f24132
4 changed files with 4 additions and 4 deletions

View File

@ -270,7 +270,7 @@ void get_id(Tox *m, char *data)
sprintf(data, "[i] ID: "); sprintf(data, "[i] ID: ");
int offset = strlen(data); int offset = strlen(data);
uint8_t address[TOX_FRIEND_ADDRESS_SIZE]; uint8_t address[TOX_FRIEND_ADDRESS_SIZE];
tox_add_address(m, address); tox_get_address(m, address);
fraddr_to_str(address, data + offset); fraddr_to_str(address, data + offset);
} }

View File

@ -228,7 +228,7 @@ int main(int argc, char *argv[])
} }
uint8_t address[TOX_FRIEND_ADDRESS_SIZE]; uint8_t address[TOX_FRIEND_ADDRESS_SIZE];
tox_add_address(tox, address); tox_get_address(tox, address);
uint32_t i; uint32_t i;
for (i = 0; i < TOX_FRIEND_ADDRESS_SIZE; i++) { for (i = 0; i < TOX_FRIEND_ADDRESS_SIZE; i++) {

View File

@ -37,7 +37,7 @@ typedef struct Messenger Tox;
* Format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)] * Format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)]
* *
*/ */
void tox_add_address(Tox *tox, uint8_t *address) void tox_get_address(Tox *tox, uint8_t *address)
{ {
Messenger *m = tox; Messenger *m = tox;
getaddress(m, address); getaddress(m, address);

View File

@ -129,7 +129,7 @@ typedef struct Tox Tox;
/* return FRIEND_ADDRESS_SIZE byte address to give to others. /* return FRIEND_ADDRESS_SIZE byte address to give to others.
* format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)] * format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)]
*/ */
void tox_add_address(Tox *tox, uint8_t *address); void tox_get_address(Tox *tox, uint8_t *address);
/* Add a friend. /* Add a friend.
* Set the data that will be sent along with friend request. * Set the data that will be sent along with friend request.