1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-27 02:36:45 +02:00
Commit Graph

417 Commits

Author SHA1 Message Date
9a629072b3 Fix possible null deref 2022-03-18 12:24:00 -04:00
2c51afd9ef Sync with master branch 2022-03-18 12:23:55 -04:00
ed8ba89cd8 Fix merge conflicts with master 2022-03-18 12:23:53 -04:00
812210d63f Implement new groupchats 2022-03-18 12:23:53 -04:00
fdfaaf953f cleanup: Remove all uses of deprecated enum names.
All-caps enum names have been deprecated for a while now and will go
away in 0.3.0.
2022-03-07 19:20:35 +00:00
f6f41a510b Add some simple impersonation detection on friend requests
This will alert the user when the first six bytes of a new
contact's public key is the same as any other contact in
their list. These 6 bytes are used elsewhere in toxic for
unique identification.

Also did a small refactor regarding the KEY_IDENT_BYTES
define
2022-01-23 11:32:57 -05:00
05dbc626e2 Make sure we check for duplicate paths in pending file transfers list
This fixes a bug where if you receive multiple file transfer
requests simultaneously and they have the same path the files
will overwrite each other
2022-01-17 10:53:34 -05:00
6f8f6f0ac5 Implement file transfer queue for offline friends
File transfers initiated for offline friends are now
added to a queue and initiated all at once when the friend
appears online.
2021-12-22 14:27:28 -05:00
701c0e1e94 cleanup: Reduce the amount of "extern" in .c files.
There is no check at all that the types of externs actually match the
type of the definition. This just accidentally was not a problem, but now
the compiler helps a bit in keeping it that way.
2021-12-11 22:35:51 +00:00
3030cda47e Fix possible null dereference
game invite info needs to be set after calloc in case it fails
2021-12-10 13:44:33 -05:00
d02ac24de8 Fix regression causing typing notifications to break
Also a small refactor so we use less duplicate code and reduce mutex usage
2021-12-07 22:14:32 -05:00
8aa57b0539 Fix issue with audio VAD threshold
The default VAD was always being set to 0. We now use the
value provided by the config file if defined
2021-12-05 16:36:13 -05:00
090fcfffe3 Fix a couple data races 2021-11-26 08:51:38 -05:00
1cba726bb8 Show self connection type and small UI makeover
Connection type is now separated from status in the top status bar
2021-11-25 23:05:33 -05:00
f3f81111c8 Greatly reduce redundant window refreshing
This should substantially reduce CPU usage and possibly fix some
issues with interface jittering/flashing
2021-11-19 17:54:35 -05:00
13337041ce Show friend connection type (UDP/TCP) in friend status bar 2021-11-10 13:27:11 -05:00
8dfd009e0e Some minor fixes for game module 2021-06-28 13:54:25 -04:00
93fb84206d Bump to version 0.11.0 2021-05-24 14:30:28 -04:00
7abf6388f8 Add ability to compile without game support 2021-05-24 14:30:28 -04:00
7aeb1a0aac Add networking to game engine / add multiplayer chess 2021-05-24 14:30:27 -04:00
a623976a0e Add game module (WIP) 2021-05-24 14:30:26 -04:00
a2f0f298aa Fix bug showing friends with busy status as online 2021-04-20 13:29:41 -04:00
8464ea9a7a Fix minor display bug with the audio call info box 2021-01-12 19:18:22 -05:00
2ff9d29491 Custom colors proof of concept
Fix formatting

Fix repeated variable in example config
2020-12-05 17:46:13 -06:00
2fcbc4fa1c Remove lots of duplicate code related to printing timestamps 2020-11-30 17:55:57 -05:00
1e985c1456 Interface improvements and bump to v0.10.0
- Give window tab and statusbar a make over
- Place window tab above input field
- Reduce input field to one square in height
- Refactor window tab so that it's now a subwin of its parent ToxWindow
- Fix bug causing notification counter to sometimes increment by 2
- No longer scroll on output when output is not at bottom of screen
- Show a small indicator on far left of window tab when output is
  not at bottom of screen
- Reduce ncurses/UI thread sleep time by half
- Handle nanosleep errors better
2020-11-29 23:26:51 -05:00
898d89e95a Properly handle failures to convert widechar strings to multibyte 2020-11-24 16:41:42 -05:00
312b38d253 A few small fixes
- Fix race condition in draw_peer()
- Handle realloc_peer_list() error
- Remove dead code in cmd_conference()
- Reduce scope of a few variable variables
- Fix possible buffer truncation in api.c
2020-11-19 14:23:32 -05:00
7e1e410307 Refactor logging
- Conference logging now behaves the same as 1-on-1 chats: Instead
  of creating a new log file every time we restat the client
  we use the unique conference ID to keep track of path names.
  This also allows us to load history for saved groups on client startup

- Added a log init function / general code refactor.

- Fixed a bug that caused log files to be created even when logging
  is disabled.
2020-11-17 16:05:20 -05:00
6c239193ab Fix bug sometimes preventing typing status from being updated 2020-11-15 12:30:26 -05:00
d75d6e8b60 sort includes 2020-11-14 00:00:05 +00:00
142ce642f0 Per-call pending status and state handling
* Proper handling of incoming video calls.
* Add command /vcall for initiating video calls
* Add command /res command to set video resolution
2020-11-14 00:00:10 +00:00
7dead5ec96 Implement simplistic VAD 2020-11-14 00:00:01 +00:00
ddcf224db2 Implement groupAV 2020-11-14 00:00:01 +00:00
daf794c4a2 Rework audio device handling
We now have at most one input and one output device open at any time,
but can have multiple capture callbacks and multiple output sources.
2020-11-14 00:00:01 +00:00
dac0124f0f Fix some issues with file transfers
- Fix bug causing failed avatar transfers to be sent as normal file transfers
      when a friend goes offline and comes back online
- Remove some unused members of the FileTransfer struct
- Rename filenum -> filenumber and friendnum -> friendnumber
2020-11-13 19:38:33 -05:00
68e1ba312d Use compound literals to zero out structs instead of memset
This is cleaner and much less prone to bugs
2020-11-10 21:25:27 -05:00
752fc6d619 Fix race condition when window is closed with active notifications
A ToxWindow's notifications need to be halted before the window is freed
2020-11-10 17:20:40 -05:00
71d7d355a6 Use enum to identify window types instead of bool variables 2020-11-09 17:01:22 -05:00
4188b392cc Rename: groupchats -> conferences
This is in line with the toxcore API naming scheme and is in preparation
for the merge with the new groupchat implementation
2020-11-08 10:08:24 -05:00
811fbfbb1e Fix char -> widechar comparisons 2020-11-08 00:07:28 -05:00
32eb7d3040 Filter invalid file names for inbound file transfers 2020-11-05 10:55:48 -05:00
f64300d1d6 Close file handlers when inbound file transfer fails 2020-11-03 13:26:23 -05:00
1a723f0e8e Fix bad behaviour with duplicate file names
If the new path is too long for the buffer we cancel the file transfer
and return an error instead of truncating the file name and continuing.
2020-11-03 13:03:47 -05:00
1bbd50aac7 Fix a few issues
- realloc needs to be error checked
- use correct format specifiers
- make sure optarg and DATA_FILE aren't null before using them
2020-11-02 18:08:54 -05:00
7560bc9547 modularize string arrays for line completion
Instead of using various different forms of string arrays and having to handle them
differently for string completion, we now always use char pointer arrays. This allows
us to remove some large stack allocations, remove a bunch of confusing defines that
keep track of global array sizes, and generally unclutters the code so it's easier
to read.
2020-11-01 11:29:51 -05:00
2b43340c90 Convert all variable length arrays to heap allocations
VLA's are inherently unsafe so the safest option is to not use them
2020-11-01 11:29:48 -05:00
4c302da503 Fix a bunch of Wformat-truncation warnings due to snprintf() misuse 2020-10-24 14:44:41 -04:00
3015138a5a Manually attempt to decode input char sequences
This is currently a fallback method for when the terminal doesn't
detect ctrl arrow sequences, but it is generalized for future additions
2020-10-13 16:12:55 -04:00
ddc8c53abf Fix unused variable warnings and change all (void)s to UNUSED macro 2020-03-30 16:02:27 -04:00