Gregory Mullen (grayhatter)
d66b3eabd5
rename messenger function, prepend m_
2016-12-03 13:21:27 -08:00
Maxim Biro
44ac196936
Fix NULL pointer dereference in log calls
2016-11-20 20:32:48 -05:00
iphydf
15cb426166
Make toxcore code C++ compatible.
...
It is still C code, so still compatible with C compilers as well. This
change lets us see more clearly where implicit conversions occur by
making them explicit.
2016-09-24 21:53:50 +01:00
iphydf
51d18236c8
Revert "Make ToxAV stateless"
...
This reverts commit 21f8db12c4
.
It is currently broken. Incoming call callbacks are not invoked, and
instead the client goes offline immediately.
2016-09-19 21:53:40 +01:00
Gregory Mullen (grayhatter)
21f8db12c4
Make ToxAV stateless
2016-09-17 14:05:51 -07:00
iphydf
a8823830d3
Add some astyle options to make it do more.
...
It now enforces a bit more formatting. In particular, padding inside
parentheses is removed. I would like it to remove padding after unary
operators, but there seems to be no option for that.
2016-09-13 01:07:02 +01:00
iphydf
0aa2840164
Group #include directives in 3-4 groups.
...
1. Current module (if C file).
2. Headers from current library.
3. Headers from other library (e.g. toxcore includes in toxav).
4. System headers.
2016-09-13 00:32:02 +01:00
iphydf
ad26560516
Improve static and const correctness.
...
- Any non-externally-visible declarations should be `static`.
- Casting away the `const` qualifier from pointers-to-const is
dangerous. All but one instance of this are now correct. The one
instance where we can't keep `const` is one where toxav code actually
writes to a chunk of memory marked as `const`. This code also assumes
4 byte alignment of data packets. I don't know whether that is a valid
assumption, but it's likely unportable, and *not* obviously correct.
- Replaced empty parameter lists with `(void)` to avoid passing
parameters to it. Empty parameter lists are old style declarations for
unknown number and type of arguments.
- Commented out (as `#if DHT_HARDENING` block) the hardening code that
was never executed.
- Minor style fix: don't use `default` in enum-switches unless the number
of enumerators in the default case is very large. In this case, it was
2, so we want to list them both explicitly to be warned about missing
one if we add one in the future.
- Removed the only two function declarations from nTox.h and put them
into nTox.c. They are not used outside and nTox is not a library.
2016-09-06 11:54:37 +01:00
iphydf
a9fbdaf46b
Do not use else
after return
.
...
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
2016-09-02 11:02:56 +01:00
iphydf
77db27331e
Sort #includes in all source files.
2016-09-01 16:35:46 +01:00
iphydf
633da98ae6
Add braces to all if statements.
2016-08-31 20:04:16 +01:00
iphydf
13ae9e9a93
Move logging to a callback.
...
This removes the global logger (which by the way was deleted when the first tox
was killed, so other toxes would then stop logging). Various bits of the code
now carry a logger or pass it around. It's a bit less transparent now, but now
there is no need to have a global logger, and clients can decide what to log and
where.
2016-08-27 01:16:14 +01:00
iphydf
6935643f9a
Fix some compiler warnings.
2016-08-18 17:10:15 +01:00
Tibor Stolz
edbfca5474
fix BWController misspelling
2015-11-11 10:33:03 +01:00
Jfreegman
c019c6236e
Prevent debug message from spamming stdout
2015-11-04 21:00:00 -05:00
irungentoo
6a494e2cbd
Astyle.
2015-11-03 13:42:05 -05:00
Eniz Vukovic
d6fdf16520
New Adaptive BR algorithm, cleanups and fixes
2015-10-10 23:54:23 +02:00
mannol
c641b0fceb
Updated with upstream
2015-08-09 12:39:21 +02:00
mannol
657a57b406
Fixed memory leak during session cleanup and fixed naming.
2015-08-07 02:04:04 +02:00
irungentoo
553f3ea513
Fixed some strange build issues.
2015-07-20 22:21:53 -04:00
mannol
6c126e34e6
Implement handling capability change on rtp level
2015-06-30 01:41:38 +02:00
mannol
73fbc22961
Fixed inconsistencies
2015-05-07 23:14:03 +02:00
mannol
b2b11f0fba
Added many test and fixed various warnings
2015-04-30 00:40:30 +02:00
mannol
9bba7a0434
Done
2015-04-29 01:01:25 +02:00
mannol
e4a020333d
working av new api
2015-04-28 00:55:57 +02:00
mannol
27e0254a98
Almooooooost
2015-04-27 00:15:57 +02:00
mannol
144fc94d69
Almost done
2015-04-26 00:31:03 +02:00
mannol
1bfd93e64a
Finished refactoring
2015-04-22 02:09:37 +02:00
mannol
3fd0ee5f08
Final touchups
2015-04-21 02:31:12 +02:00
mannol
d1fd3e36a6
Updated with upstream
2015-04-17 19:19:58 +02:00
mannol
da6c17222f
The pretty basic adaptive bitrate is *working*
2015-04-16 02:00:34 +02:00
mannol
2465f486ac
Started custom RTCP
2015-04-13 01:45:53 +02:00
mannol
62af82705a
Some progress
2015-03-22 23:50:43 +01:00
irungentoo
e5791ed9ef
Added different error codes for custom packet functions in Messenger.
2015-02-26 13:13:26 -05:00
irungentoo
33370edee6
Changes to custom packet functions in Messenger.
...
Added function for rtp A/V packets, modified functions to behave
correctly for the new api.
2015-02-26 08:05:57 -05:00
mannol
29601feb76
New msi protocol
2015-02-21 01:07:22 +01:00
mannol
483a6ffa32
Added 2 new headers into msi for buffer control
2015-02-17 23:34:40 +01:00
irungentoo
c6a59e64b7
Updated types in Messenger callbacks to fit with the ones in the new api.
...
Friend number changed from int32_t to uint32_t.
Some lengths changed to size_t.
2015-02-17 15:49:22 -05:00
mannol
39680f31d0
Progress
2015-02-01 23:43:54 +01:00
mannol
1450c22d01
Current progress
2015-01-24 23:29:54 +01:00
irungentoo
7d27893f1a
Merge branch 'more_consistent_custom_packet_handlers' of https://github.com/wrouesnel/toxcore
2014-12-09 16:39:52 -05:00
Will Rouesnel
8a56cb3b58
Change prototype for custom_packet_handler functions
...
Change the custom_packet_handler callback function interface to be
consistent with other callback interfaces.
The new interface takes the Messenger object calling as the first
parameter, and moves the user data object to be the last parameter.
This makes it comparable to the callbacks for file transfer and the
like, and should simplify building interfaces.
The new prototype is: int (*)(Messenger *m, int32_t friendnumber, const
uint8_t *data, uint32_t len, void *object)
2014-12-09 07:51:49 +11:00
irungentoo
8deb032b2d
Merge branch 'mutex-1' of https://github.com/mannol/toxcore
2014-11-29 16:09:24 -05:00
mannol
e62ded3a6d
More av cleanup
2014-11-29 13:42:19 +01:00
irungentoo
279c33c01a
Merge branch 'master' of https://github.com/mannol/toxcore
2014-11-24 20:24:59 -05:00
mannol
386c9748d4
av refactor
2014-11-18 00:46:46 +01:00
sin
a46810a197
Rework toxav/rtp.c to use ntohl/htonl and ntohs/htons
...
Now we can also remove the helper routines from toxcore/util.[ch].
2014-09-30 13:18:28 -04:00
mannol
733c509582
Fix some toxav warnings
2014-08-04 00:15:00 +02:00
irungentoo
d052bbc3eb
Start sequence number at zero instead of one.
2014-07-25 10:39:34 -04:00
mannol
79115259a8
Fixed conflicts
2014-07-21 04:10:05 +02:00
mannol
1aeeef58b2
Improved protocol and cleaned code a bit
2014-07-21 01:10:57 +02:00
notsecure
3d4de767fe
use callbacks for a/v
2014-07-07 16:10:10 -04:00
irungentoo
a51f6bbd69
Merge branch 'mannol1-master'
2014-07-05 12:25:30 -04:00
mannol
ebdc236d51
Fixed conflicts
2014-07-05 15:13:55 +02:00
mannol
8b9d3992a4
Make rtp & codec actions thread-safe
2014-07-05 15:11:25 +02:00
irungentoo
83b9fbc1dc
Fixed out of bounds read.
...
payload_type seems to be completely useless and should be removed.
2014-07-04 19:09:50 -04:00
irungentoo
c4f0650ae3
Fixed const related warnings.
2014-07-02 16:04:41 -04:00
irungentoo
bd6f8a2186
Merge branch 'mannol1-master'
2014-06-28 22:29:39 -04:00
mannol
aeaf997ca5
Removed redundant encryption and asserts
2014-06-28 04:13:38 +02:00
irungentoo
aba37b0f71
Merge branch 'mannol1-master'
2014-06-20 10:01:27 -04:00
mannol
88a131a2e8
Fixed bug when adjusting queue size
2014-06-20 00:23:05 +02:00
Maxim Biro
741ad009e0
Removed IRC references
2014-06-18 17:58:01 -04:00
mannol
d7c1157375
Fixed byte order and removed log functions from misc_tools
2014-05-31 17:27:22 +02:00
irungentoo
82e38883a2
Merge branch 'mannol1-Multicalls' into multi-av
2014-05-25 12:27:48 -04:00
mannol
565e95301f
Tests works and some fixes
2014-05-24 16:02:01 +02:00
irungentoo
a54d098f6f
Changed lossy packet function names to better ones.
...
Fixed rtp checking the wrong return value for one.
2014-05-22 10:18:22 -04:00
mannol
9db41e7582
Merge remote-tracking branch 'upstream/master' into Multicalls-patch
2014-05-22 00:08:19 +02:00
irungentoo
f818c1a197
Added functions to send and receive lossy encrypted packets over
...
the Tox connection.
A/V should now work over TCP.
2014-05-21 15:28:14 -04:00
mannol
a1f2a18ae4
Merge upstream and other stuff
2014-05-20 00:10:40 +02:00
mannol
843171fbc8
This works.
2014-05-16 19:56:40 +02:00
mannol
9bb910a370
This should work
2014-05-10 18:00:49 +02:00
irungentoo
8369ac98b0
Updated A/V to new time function.
2014-05-04 20:33:08 -04:00
mannol
0fa03b9240
Bunch of random changes
2014-05-03 01:46:03 +02:00
irungentoo
9c6a8432ce
Crypto related cleanups.
...
Moved Bunch of functions from net_crypto to crypto_core.
decrypt_data_fast and decrypt_data_symmetric were the same thing
therefore, removed decrypt_data_fast.
Replaced all the crypto_secretbox_* defines with the equivalent
crypto_box_* one.
New define: crypto_box_KEYBYTES that is equal to
crypto_box_BEFORENMBYTES.
2014-04-21 16:51:36 -04:00
AZ Huang
416a079134
Fix memory leak.
2014-04-10 06:15:40 +08:00
Maks Naumov
5c49f7d2b9
fix RTPHeader filling by zeros underflow
...
regression from 6a78e2e71c
2014-03-28 00:29:18 +02:00
mannol
9ba7cb7e76
Removed logging to stderr and fixed timeout handling
2014-03-12 00:22:49 +01:00
mannol
d1fbbae5e9
Added custom callback data and capability identifier
2014-03-11 00:36:47 +01:00
mannol
6a78e2e71c
Fixed several bugs and added some features
2014-03-07 03:13:04 +01:00
irungentoo
354a392d69
Added better documentation to the api, move some defines, fixed a possible issue.
2014-02-19 08:08:55 -05:00
irungentoo
a3904932bf
crypto_secretbox_NONCEBYTES is the one to use for the symmetric encryption.
...
Not currently a big deal since they are the same size, but...
2014-02-19 07:34:44 -05:00
irungentoo
baa4a2f11d
Astyled av code.
2014-02-16 20:01:30 -05:00
mannol
272ed7e6db
Moved event to toxav
2014-02-16 19:11:55 -05:00
mannol
393433ce99
Public header ready to go
2014-02-16 19:11:55 -05:00
mannol
292708c336
Started adding public API
2014-02-16 19:11:55 -05:00