Added tox_ to 2 typedefs.

This commit is contained in:
irungentoo 2013-08-23 10:34:10 -04:00
parent 658bfab41e
commit 0f77a2d131
2 changed files with 5 additions and 5 deletions

View File

@ -41,14 +41,14 @@ typedef union {
uint8_t c[4]; uint8_t c[4];
uint16_t s[2]; uint16_t s[2];
uint32_t i; uint32_t i;
} IP; } tox_IP;
typedef struct { typedef struct {
IP ip; tox_IP ip;
uint16_t port; uint16_t port;
/* not used for anything right now */ /* not used for anything right now */
uint16_t padding; uint16_t padding;
} IP_Port; } tox_IP_Port;
/* status definitions */ /* status definitions */
enum { enum {
@ -252,7 +252,7 @@ void tox_callback_connectionstatus(Tox *tox, void (*function)(Tox *tox, int, uin
/* Use this function to bootstrap the client /* Use this function to bootstrap the client
Sends a get nodes request to the given node with ip port and public_key */ Sends a get nodes request to the given node with ip port and public_key */
void tox_bootstrap(Tox *tox, IP_Port ip_port, uint8_t *public_key); void tox_bootstrap(Tox *tox, tox_IP_Port ip_port, uint8_t *public_key);
/* returns 0 if we are not connected to the DHT /* returns 0 if we are not connected to the DHT
returns 1 if we are */ returns 1 if we are */

View File

@ -511,7 +511,7 @@ int main(int argc, char *argv[])
new_lines(idstring); new_lines(idstring);
strcpy(line, ""); strcpy(line, "");
IP_Port bootstrap_ip_port; tox_IP_Port bootstrap_ip_port;
bootstrap_ip_port.port = htons(atoi(argv[2])); bootstrap_ip_port.port = htons(atoi(argv[2]));
int resolved_address = resolve_addr(argv[1]); int resolved_address = resolve_addr(argv[1]);