Age | Commit message (Collapse) | Author |
|
|
|
* add global friend_connection status callback, used for group rejoining
* stop leaving groups on killing tox
|
|
|
|
|
|
It turns out, `unix_time` is also monotonic, and is used as such, so I've
renamed the new functions to `mono_time_*`.
2018-07-08:
```
00:01 <@irungentoo> the idea used to be that the unix_time() function
could go backward in time but I think I might have started using it like
if it could not after I changed it so that it would never go back in time
```
|
|
Also:
* No inner structs.
* One declarator per member declaration.
* Function names are snake_case.
* Names ending in `_cb` are function types.
* `++i` is preferred over `i++`.
|
|
Rules:
1. Constants are uppercase names: THE_CONSTANT.
2. SUE[1] types start with an uppercase letter and have at least one
lowercase letter in it: The_Type, THE_Type.
3. Function types end in "_cb": tox_friend_connection_cb.
4. Variable and function names are all lowercase: the_function.
This makes it easier for humans reading the code to determine what an
identifier means. I'm not convinced by the enum type name change, but I
don't know a better rule. Currently, a lot of enum types are spelled like
constants, which is confusing.
[1] struct/union/enum
|
|
The Family stuff in toxcore is a big mess. I'm sure I saw a bunch of bugs
on the way, but I'm not verifying that code now, so the bugs stay.
|
|
|
|
|
|
This changes only code, no string literals or comments.
|
|
|
|
|
|
|
|
Also replace &(x) with &x for consistency.
|
|
|
|
Issue: If another tox instance started on the not default port, LAN
discovery will be failed.
Now tox will iterate though all possible ports to find another tox
instances.
|
|
|
|
socket -> net_socket
htons -> net_htons
htonl -> net_htonl
connect -> net_connect
sendto -> net_sendto_ip4
getaddrinfo -> net_getipport
sa_family_t -> Family
|
|
|
|
"All rights reserved" was incorrect. The project was licensed under GPL3,
which means a lot of rights are licensed to everybody in the world, i.e.
not reserved to the "Tox Project".
|
|
|
|
|
|
These three objects and their callback IDs are always the same.
|
|
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.
|
|
This header is a requirement for the public API, therefore is assumed to
exist. It is a C99 standard library header, and _Bool is not intended to
be used directly, except in legacy code that defines bool (and
true/false) itself. We don't use or depend on such code. None of our
client code uses or depends on such code. There is no reason to not use
bool.
|
|
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.
|
|
|
|
Messenger is slightly twisty when it comes to sending connection status
callbacks It will very likely need at the very least a partial refactor to
clean it up a bit. Toxcore shouldn't need void *userdata as deep as is
currently does.
(amend 1) Because of the nature of toxcore connection callbacks, I decided to
change this commit from statelessness for connections changes to statelessness
for friend requests. It's simpler this was and doesn't include doing anything
foolish in the time between commits.
group fixup because grayhatter doesn't want to do it
"arguably correct" is not how you write security sensitive code
Clear a compiler warning about types within a function.
|
|
Ensure that nobody inadvertly modifies the temporary packet data buffer.
|
|
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
|
|
|
|
See #27 and #40 for details.
|
|
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
fix: make crypto_core more stable agains null ptr dereference
|
|
|
|
|
|
is hosting a relay on his ip.
|
|
|
|
|
|
|
|
|
|
Should fix certain connection issues that sometimes happen.
The dht public key of the peer must be known to create the connection.
If the dht pk of the peer changes when a connection is active, it is
killed to make way for the new one.
|
|
|
|
without ever actually being connected.
|
|
Set friend in onion as offline when friend goes offline.
|
|
|
|
|
|
They are now all uint16_t instead of sometimes being uint32_t.
Replaced some other uint32_t with unsigned ints.
|
|
are already connected to the friend but they have not added us yet.
|
|
|