diff options
-rw-r--r-- | core/DHT.c | 2 | ||||
-rw-r--r-- | core/friend_requests.c | 2 | ||||
-rw-r--r-- | docs/install.rst | 2 | ||||
-rw-r--r-- | testing/toxic/chat.c | 3 | ||||
-rw-r--r-- | testing/toxic/prompt.c | 6 |
5 files changed, 9 insertions, 6 deletions
@@ -1108,7 +1108,7 @@ static int send_NATping(uint8_t * public_key, uint64_t ping_id, uint8_t type) | |||
1108 | static int handle_NATping(uint8_t * packet, uint32_t length, IP_Port source) | 1108 | static int handle_NATping(uint8_t * packet, uint32_t length, IP_Port source) |
1109 | { | 1109 | { |
1110 | if (length < crypto_box_PUBLICKEYBYTES * 2 + crypto_box_NONCEBYTES + ENCRYPTION_PADDING | 1110 | if (length < crypto_box_PUBLICKEYBYTES * 2 + crypto_box_NONCEBYTES + ENCRYPTION_PADDING |
1111 | && length > MAX_DATA_SIZE + ENCRYPTION_PADDING) | 1111 | || length > MAX_DATA_SIZE + ENCRYPTION_PADDING) |
1112 | return 1; | 1112 | return 1; |
1113 | 1113 | ||
1114 | /* check if request is for us. */ | 1114 | /* check if request is for us. */ |
diff --git a/core/friend_requests.c b/core/friend_requests.c index f1ffb8d0..5550b662 100644 --- a/core/friend_requests.c +++ b/core/friend_requests.c | |||
@@ -104,7 +104,7 @@ static int request_recieved(uint8_t * client_id) | |||
104 | int friendreq_handlepacket(uint8_t * packet, uint32_t length, IP_Port source) | 104 | int friendreq_handlepacket(uint8_t * packet, uint32_t length, IP_Port source) |
105 | { | 105 | { |
106 | if (packet[0] == 32) { | 106 | if (packet[0] == 32) { |
107 | if (length <= crypto_box_PUBLICKEYBYTES * 2 + crypto_box_NONCEBYTES + 1 + ENCRYPTION_PADDING && | 107 | if (length <= crypto_box_PUBLICKEYBYTES * 2 + crypto_box_NONCEBYTES + 1 + ENCRYPTION_PADDING || |
108 | length > MAX_DATA_SIZE + ENCRYPTION_PADDING) | 108 | length > MAX_DATA_SIZE + ENCRYPTION_PADDING) |
109 | return 1; | 109 | return 1; |
110 | if (memcmp(packet + 1, self_public_key, crypto_box_PUBLICKEYBYTES) == 0) {// check if request is for us. | 110 | if (memcmp(packet + 1, self_public_key, crypto_box_PUBLICKEYBYTES) == 0) {// check if request is for us. |
diff --git a/docs/install.rst b/docs/install.rst index c5fea5d1..9b6e2f29 100644 --- a/docs/install.rst +++ b/docs/install.rst | |||
@@ -6,7 +6,7 @@ Linux | |||
6 | 6 | ||
7 | First, install the build dependencies :: | 7 | First, install the build dependencies :: |
8 | 8 | ||
9 | bash apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev cmake checkinstall | 9 | sudo apt-get install build-essential libtool autotools-dev automake libconfig-dev ncurses-dev cmake checkinstall |
10 | 10 | ||
11 | .. note :: ``libconfig-dev`` should be >= 1.4. | 11 | .. note :: ``libconfig-dev`` should be >= 1.4. |
12 | 12 | ||
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c index f28a6a30..4ea459d9 100644 --- a/testing/toxic/chat.c +++ b/testing/toxic/chat.c | |||
@@ -32,7 +32,7 @@ void execute(ToxWindow* self, ChatContext* ctx, char* cmd); | |||
32 | static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len) { | 32 | static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len) { |
33 | ChatContext* ctx = (ChatContext*) self->x; | 33 | ChatContext* ctx = (ChatContext*) self->x; |
34 | uint8_t nick[MAX_NAME_LENGTH] = {0}; | 34 | uint8_t nick[MAX_NAME_LENGTH] = {0}; |
35 | 35 | ||
36 | time_t now; | 36 | time_t now; |
37 | time(&now); | 37 | time(&now); |
38 | struct tm * timeinfo; | 38 | struct tm * timeinfo; |
@@ -58,6 +58,7 @@ static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len) | |||
58 | wprintw(ctx->history, "%s\n", msg); | 58 | wprintw(ctx->history, "%s\n", msg); |
59 | 59 | ||
60 | self->blink = true; | 60 | self->blink = true; |
61 | beep(); | ||
61 | } | 62 | } |
62 | 63 | ||
63 | static void chat_onNickChange(ToxWindow* self, int num, uint8_t* nick, uint16_t len) { | 64 | static void chat_onNickChange(ToxWindow* self, int num, uint8_t* nick, uint16_t len) { |
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index 1ba15695..16750c5d 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c | |||
@@ -158,7 +158,9 @@ static void execute(ToxWindow* self, char* cmd) { | |||
158 | break; | 158 | break; |
159 | } | 159 | } |
160 | } | 160 | } |
161 | 161 | else if(!strcmp(cmd, "clear")) { | |
162 | wclear(self->window); | ||
163 | } | ||
162 | else if(!strcmp(cmd, "help")) { | 164 | else if(!strcmp(cmd, "help")) { |
163 | print_usage(self); | 165 | print_usage(self); |
164 | } | 166 | } |
@@ -316,7 +318,7 @@ static void print_usage(ToxWindow* self) { | |||
316 | wprintw(self->window, " myid : Print your ID\n"); | 318 | wprintw(self->window, " myid : Print your ID\n"); |
317 | wprintw(self->window, " quit/exit : Exit program\n"); | 319 | wprintw(self->window, " quit/exit : Exit program\n"); |
318 | wprintw(self->window, " help : Print this message again\n"); | 320 | wprintw(self->window, " help : Print this message again\n"); |
319 | 321 | wprintw(self->window, " clear : Clear this window\n"); | |
320 | 322 | ||
321 | wattron(self->window, A_BOLD); | 323 | wattron(self->window, A_BOLD); |
322 | wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n"); | 324 | wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n"); |