Commit Graph

15 Commits

Author SHA1 Message Date
iphydf
fad6e4e173
cleanup: Make all .c files include the headers they need. 2023-12-27 01:21:47 +00:00
jfreegman
5880971af8
Make functions take const pointer to IP_Port wherever possible
An IP_Port is a fairly large data structure, and copying them down
the call stack creates a lot of unnecessary overhead.
2022-02-03 10:54:48 -05:00
iphydf
5fbcbb6c83
cleanup: Remove uses of strcpy and sprintf.
Use of `strcpy` in these particular cases was safe, but it's hard to
tell and also useless. `strcpy` would effectively need to do another
`strlen` which we already did.

Also removed sprintf, which was also safe in this case but it's easier to
be "obviously safe", especially for static analysers.
2022-01-17 18:25:40 +00:00
iphydf
11ad5471b9
Use spdx license identifier instead of GPL blurb. 2020-03-14 13:06:19 +00:00
iphydf
473cde24d8
Update copyright to 2018. 2018-08-26 18:57:29 +00:00
iphydf
be797d4b03
Move system header includes from network.h to network.c 2018-05-20 15:42:42 +00:00
Diadlo
b19a9e5464
Add part of platform-independent network API implementation
socket      -> net_socket
htons       -> net_htons
htonl       -> net_htonl
connect     -> net_connect
sendto      -> net_sendto_ip4
getaddrinfo -> net_getipport
sa_family_t -> Family
2017-02-26 23:16:16 +03:00
iphydf
8f96ca6d86
Update license headers and remove redundant file name comment.
"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".
2017-01-19 00:01:44 +00: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
633da98ae6
Add braces to all if statements. 2016-08-31 20:04:16 +01:00
iphydf
a5e35180c7
Make tox_callback_friend_name stateless.
See #27 and #40 for details.
2016-08-18 00:01:53 +01:00
Maxim Biro
6b40a581b1 Put config-related functions in a separate file
bootstrap_node_packets.c was giving an error as it was being included
twice and there were no include guards, so part of it was split into
bootstrap_node_packets.h.
2016-01-01 00:19:35 -05:00
Maxim Biro
14d942c1e1 Fixed incompatible pointer type warning 2015-02-07 20:35:51 -05:00
irungentoo
881b2d900d
Fixed some warnings. 2014-06-15 20:49:39 -04:00
Maxim Biro
5a142bb697 Renamed dht server to dht node 2014-02-22 17:07:15 -05:00