diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-10 17:31:58 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-10 17:31:58 -0400 |
commit | 0b18dcda6f6bd181a164755a82decc7ae08c603e (patch) | |
tree | 6044ddb6585c43a3665e06e43e353205e8931367 /testing | |
parent | f471602d5d7ed9b5d8c92f7a55d2e6589c15577c (diff) |
Per friend request data added.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/Messenger_test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/testing/Messenger_test.c b/testing/Messenger_test.c index 0fd9c557..6b0e56fc 100644 --- a/testing/Messenger_test.c +++ b/testing/Messenger_test.c | |||
@@ -57,7 +57,7 @@ void print_request(uint8_t * public_key, uint8_t * data, uint16_t length) | |||
57 | } | 57 | } |
58 | printf("\nOf length: %u with data: %s \n", length, data); | 58 | printf("\nOf length: %u with data: %s \n", length, data); |
59 | 59 | ||
60 | if(length != sizeof((uint8_t*)"Install Gentoo")) | 60 | if(length != sizeof("Install Gentoo")) |
61 | { | 61 | { |
62 | return; | 62 | return; |
63 | } | 63 | } |
@@ -85,8 +85,6 @@ int main(int argc, char *argv[]) | |||
85 | m_callback_friendrequest(print_request); | 85 | m_callback_friendrequest(print_request); |
86 | m_callback_friendmessage(print_message); | 86 | m_callback_friendmessage(print_message); |
87 | 87 | ||
88 | m_setinfo((uint8_t*)"Install Gentoo", sizeof((uint8_t*)"Install Gentoo"));//The message we send is a message of peace | ||
89 | |||
90 | printf("OUR ID: "); | 88 | printf("OUR ID: "); |
91 | uint32_t i; | 89 | uint32_t i; |
92 | for(i = 0; i < 32; i++) | 90 | for(i = 0; i < 32; i++) |
@@ -99,7 +97,7 @@ int main(int argc, char *argv[]) | |||
99 | char temp_id[128]; | 97 | char temp_id[128]; |
100 | printf("\nEnter the client_id of the friend you wish to add (32 bytes HEX format):\n"); | 98 | printf("\nEnter the client_id of the friend you wish to add (32 bytes HEX format):\n"); |
101 | scanf("%s", temp_id); | 99 | scanf("%s", temp_id); |
102 | int num = m_addfriend(hex_string_to_bin(temp_id)); | 100 | int num = m_addfriend(hex_string_to_bin(temp_id), (uint8_t*)"Install Gentoo", sizeof("Install Gentoo")); |
103 | 101 | ||
104 | perror("Initialization"); | 102 | perror("Initialization"); |
105 | IP_Port bootstrap_ip_port; | 103 | IP_Port bootstrap_ip_port; |