Commit Graph

745 Commits

Author SHA1 Message Date
iphydf
ad13518153
Add missing #include <pthread.h> to av_test.c.
It was an undefined function before.
2016-09-01 15:22:03 +01:00
iphydf
3a9300368d
Add newlines because astyle wants them.
We'll revert this once we move to clang-format.
2016-08-31 20:54:20 +01:00
iphydf
633da98ae6
Add braces to all if statements. 2016-08-31 20:04:16 +01:00
iphydf
6356eb4e4f
Enable build of av_test.
It has not been built in a while. We do want to keep this one working (or at
least compiling).
2016-08-31 20:02:41 +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
Gregory Mullen (grayhatter)
1f94c96266
Make the friend message callback stateless 2016-08-20 11:07:49 -07:00
iphydf
bdf5ac37b4
Make friend_status_message callback stateless.
See #40 for details.
2016-08-18 17:19:23 +01:00
iphydf
6935643f9a
Fix some compiler warnings. 2016-08-18 17:10:15 +01:00
iphydf
a5e35180c7
Make tox_callback_friend_name stateless.
See #27 and #40 for details.
2016-08-18 00:01:53 +01:00
iphydf
db22522741
Add missing DHT_bootstrap to CMakeLists.txt.
- This PR also adds a DEBUG cmake option that enables -DTOX_DEBUG.
- We also remove `-Wall`, because there are too many warnings, and nobody really
  looks at them at the moment. We'll see about fixing them soon. We'll also want
  to enable `-Werror` at some point.
- Finally, this PR enables `-O3` to make sure toxcore still works correctly
  under heavy compiler optimisations.
2016-08-17 22:12:39 +01:00
iphydf
dd8a568141
Make self_connection_status callback stateless.
**What are we doing?**

We are moving towards stateless callbacks. This means that when registering a
callback, you no longer pass a user data pointer. Instead, you pass a user data
pointer to tox_iterate. This pointer is threaded through the code, passed to
each callback. The callback can modify the data pointed at. An extra indirection
will be needed if the pointer itself can change.

**Why?**

Currently, callbacks are registered with a user data pointer. This means the
library has N pointers for N different callbacks. These pointers need to be
managed by the client code. Managing the lifetime of the pointee can be
difficult. In C++, it takes special effort to ensure that the lifetime of user
data extends at least beyond the lifetime of the Tox instance. For other
languages, the situation is much worse. Java and other garbage collected
languages may move objects in memory, so the pointers are not stable. Tox4j goes
through a lot of effort to make the Java/Scala user experience a pleasant one by
keeping a global array of Tox+userdata on the C++ side, and communicating via
protobufs. A Haskell FFI would have to do similarly complex tricks.

Stateless callbacks ensure that a user data pointer only needs to live during a
single function call. This means that the user code (or language runtime) can
move the data around at will, as long as it sets the new location in the
callback.

**How?**

We are doing this change one callback at a time. After each callback, we ensure
that everything still works as expected. This means the toxcore change will
require 15 Pull Requests.
2016-08-17 14:57:20 +01:00
Roman Proskuryakov
ed3a794c9b fix: compare sensitive data with sodium_memcmp
fix: make increment_nonce & increment_nonce_number independent of user-controlled input
	fix: make crypto_core more stable agains null ptr dereference
2016-01-27 02:14:59 +03: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
irungentoo
2ab3b14731
Merge branch 'dragonfly' of https://github.com/mneumann/toxcore 2015-08-08 21:38:23 -04:00
mannol
3c8cae72d0 Removed redundant function from video.[h|c] 2015-08-08 17:45:24 +02:00
irungentoo
6cb8ff4d65
Removed a useless define. 2015-08-07 20:53:53 -04:00
Michael Neumann
caebc5303a Fix for DragonFlyBSD 2015-08-08 01:45:55 +02:00
mannol
657a57b406 Fixed memory leak during session cleanup and fixed naming. 2015-08-07 02:04:04 +02:00
irungentoo
dfc154cc9e
client_id -> public_key 2015-07-29 22:39:56 -04:00
mannol
2ecb71bb1e Renamed TOXAV_CALL_STATE to TOXAV_FRIEND_CALL_STATE 2015-06-27 17:28:07 +02:00
mannol
a3132feddb Fixed sample size in callback and other stuff 2015-06-13 15:00:34 +02:00
mannol
d694839d60 Rebased on master and removed alpha channel (again) 2015-06-05 22:14:37 +02:00
irungentoo
8e80ced6ce
Move savedata to options struct.
Add a way to select the type of savedata (normal savedata, load a
secret key, potentially others?) to load.
2015-05-22 18:23:56 -04:00
mannol
3100042a2b Updated with master 2015-05-22 23:22:31 +02:00
irungentoo
782d68cdc3
Syncbot fixes. 2015-05-20 14:09:05 -04:00
mannol
73fbc22961 Fixed inconsistencies 2015-05-07 23:14:03 +02:00
mannol
9bba7a0434 Done 2015-04-29 01:01:25 +02:00
irungentoo
b0983104d5
Renamed tox_file_send_control to tox_file_control.
Renamed tox_file_send_seek to tox_file_seek.
2015-03-21 08:58:54 -04:00
Dubslow
d8da9bf709
callback_file_request_chunk -> callback_file_chunk_request
A couple of minor reasons, combined warrant a PR imo:
a) fileChunkRequested is a better signal name than fileRequestChunkReceived, and I don't want to break consistency by reordering words for just this signal
b) "request chunk" is parsed by English speakers as a verb-object combination,
   implying sending the request, not receiving, whereas "chunk requested" is
   parsed (more correctly) as an adjective-noun combo (in particular, request is
   a noun not a verb), and thus reads far more like "hey heads up we just got a request"

For instance some tests/testing code had some callbacks to *receive* chunk requests, and they were called "tox_file_request_chunk"... to receive a chunk, not request it. Now they're called "tox_file_chunk_request".

So yeah...
2015-03-19 08:38:27 -05:00
irungentoo
e0bd6ef4e0
Renamed TOX_MESSAGE_TYPE_MESSAGE to TOX_MESSAGE_TYPE_NORMAL. 2015-03-18 17:14:57 -04:00
irungentoo
45cf8a744c
Merge branch 'one_more_rename' of https://github.com/dubslow/toxcore into new_api 2015-03-18 16:15:36 -04:00
irungentoo
d711362622
Merged normal message function and send action function into one
messaging function.

This removes code duplication and allows us to easily add new message
types to the api without having to add new functions.
2015-03-18 15:32:53 -04:00
Dubslow
2f65de6fd1
Move get_connection_status to self pseudonamespace, to contrast friend_get_connection_status 2015-03-18 14:18:36 -05:00
irungentoo
b9e747fd50
When friend goes offline all his file transfers get removed.
This is now documented in the API.

Ported programs in testing/ to this behaviour.
2015-03-18 14:39:52 -04:00
irungentoo
5b7cbc8956
Api changes.
receive to recv in file receive functions.

Added TOX_MAX_FILENAME_LENGTH define.
2015-03-18 12:54:00 -04:00
irungentoo
8286c2c22f
Save function renamed to tox_get_savedata() 2015-03-17 16:20:38 -04:00
irungentoo
24c70c9e84
Added and implemented file_id parameter to file tranfers.
file_id is a 32byte identifier that can be used by users to identify
file tranfers across core/client restarts in order to resume broken
file tranfers.

In avatar tranfers it corresponds to the hash of the avatar.

Added tox_file_get_file_id() function to api to obtain the file_id
of an ongoing file transfer.

If not set, core will generate a random one.
2015-03-17 13:44:48 -04:00
irungentoo
6cf7270638
Make nTox save on exit. 2015-03-14 10:05:39 -04:00
irungentoo
c3e07b73d3
Remove TOX_FILE_KIND typedef. 2015-03-13 15:38:44 -04:00
irungentoo
8e2957ec50
Merge branch 'newer_api' of https://github.com/dubslow/toxcore into new_api 2015-03-13 15:29:34 -04:00
Dubslow
64fefb6f43
revert to TOX_FILE_KIND 2015-03-13 12:34:14 -05:00
Dubslow
3bf259f69d Convert core code depending on the api 2015-03-12 18:23:14 -05:00
irungentoo
8dc2db2025
Added position parameter to tox_file_send_chunk().
This is done so that the function now has the same parameters as the
request chunk callback.
2015-03-12 15:17:34 -04:00
irungentoo
7afab000f7
tox_new now sets error to TOX_ERR_NEW_PORT_ALLOC when binding to port fails. 2015-03-12 13:03:14 -04:00
irungentoo
8e55d96381
Ported nTox to new file transfer api. 2015-03-10 18:49:06 -04:00
irungentoo
c434d48579
testing/tox_sync now fully works on the new api. 2015-03-10 18:29:10 -04:00
irungentoo
f5eca31637
Fixed small issue. 2015-03-09 20:59:50 -04:00
irungentoo
d83efd35dd
Ported some of the code in testing/ to the new api. 2015-02-24 20:29:01 -05:00
Alexandre Erwin Ittner
c2421e6f21 Update avatar documentation
Add missing function and fixes some typos and formatting.
2015-01-31 20:13:39 -02:00
Alexandre Erwin Ittner
eea4153594 Rename "client id" to "public key" in avatar docs and examples
Commit b8d530c9e0 and some of its
parents changed the public name of "client id" to "public key".
Update the avatar documentation to follow the idea.
2015-01-31 19:45:03 -02:00
irungentoo
534efc7349
Fixed irc syncbot. 2014-11-10 18:03:09 -05:00
irungentoo
94ac524374
Group audio might work now but I have not tested anything yet. 2014-11-10 17:59:14 -05:00
dubslow
ca38ee8bc7 fix #1120 2014-10-17 06:04:08 -05:00
irungentoo
9ef1be1b6f
Use monotonic time function already in toxcore. 2014-10-15 13:28:19 -04:00
irungentoo
3d1c0f0536
irc_syncbot now parse out NULL characters from the Tox groupchat. 2014-10-15 09:01:00 -04:00
irungentoo
6985353392
Added basic IRC group syncbot to testing. 2014-10-14 19:49:29 -04:00
irungentoo
e304fa847e
Group chats now actually work somewhat. 2014-10-01 15:28:27 -04:00
dubslow
57666d95ba Merge branch 'master' of https://github.com/irungentoo/toxcore 2014-09-28 12:37:47 -05:00
Alexandre Erwin Ittner
3711b881cb test_avatars: Implement new policy for the user avatar file
Change location of the user avatar from "<data dir>/avatar.png" to
"<data dir>/avatars/<user id>.png", as proposed by commit
6f4ab49f5c
2014-09-27 23:11:53 -03:00
irungentoo
33721da46a
Added callbacks to DHT called when the ip of a peer is discovered. 2014-09-26 17:56:06 -04:00
irungentoo
8b35d194c0
Group chats are starting to work. 2014-09-26 13:25:52 -04:00
irungentoo
d264010364
Tox object doesn't need to be passed to tox_hash. 2014-09-25 07:18:44 -04:00
irungentoo
80fdfbad07
Merge branch 'master' of https://github.com/dubslow/toxcore 2014-09-25 07:16:49 -04:00
dubslow
d409bad30d remove tox_avatar_hash 2014-09-24 18:06:30 -05:00
irungentoo
bce301f3c3
Merge branch 'stal888-patch-1' 2014-09-24 18:00:17 -04:00
dubslow
ba6ae15a73 housekeeping 2014-09-24 13:00:42 -05:00
stal
f27794000a ifdef out use of linux/limts.h in test_avatars
This fixes building on OS X and other systems whose limits.hs have PATH_MAX.
2014-09-23 20:47:21 -07:00
irungentoo
b52da45aeb
Merge branch 'avatars' of https://github.com/ittner/toxcore 2014-09-22 15:07:14 -04:00
Alexandre Erwin Ittner
70b4018069 Remove support for avatar image formats other than PNG
Support for other formats was deemed unnecessary in the code review
and therefore removed. The value for the constant TOX_AVATARFORMAT_PNG
is now set in stone; if the other formats become needed again in the
future, this commit shall be reverted and the enum values reordered to
keep compatibility.
2014-09-21 10:25:46 -03:00
Alexandre Erwin Ittner
e4f66475d8 Add support for user avatars in the core protocol
Add a protocol and the APIs to straightforwardly support user avatars
in client applications. The protocol is designed to transfer avatars
in background, between friends only, and minimize network load by
providing a lightweight avatar notification for local cache validation.
Strict safeguards are imposed to avoid damage from non-cooperative or
malicious users and to limit network usage.

The complete documentation is available in docs/Avatars.md and sample
code is available in testing/test_avatars.c.

Code and documentation are released under the GNU GPLv3 or later, as
described in the file COPYING.
2014-08-30 16:43:07 -03:00
Maxim Biro
bc5daa5eff Added FreeBSD include 2014-08-23 23:20:00 -04:00
stal
62e6e9bc07 Daily OS X fix.
Patch also fixes NetBSD and OpenBSD, but I can't test that.

<pty.h> is <util.h> on some BSDs.
2014-08-20 09:28:26 -07:00
irungentoo
7330ebdffe
Added tox_shell to testing.
tox_shell is a basic secure shell that can be used to control a
computer from any Tox client.

Just run tox_shell and make it add your Tox id.

It's very basic but it works.
2014-08-19 19:01:18 -04:00
irungentoo
7557b92fc9
Modified tox_bootstrap_from_address() function.
PORT IS NO LONGER PASSED IN NETWORK BYTE ORDER.

Removed useless ipv6enabled parameter.
2014-08-14 19:01:21 -04:00
irungentoo
ef78169842
Added disabling of UDP and basic SOCKS5 proxy support to public API.
tox_new() now takes a Tox_Options struct as argument.

If a NULL pointer is passed to that struct, defaults are used.
2014-08-14 18:34:20 -04:00
irungentoo
1298932deb
UDP can now be disabled.
new_messenger() now takes an options struct as an argument.
2014-08-14 15:27:34 -04:00
irungentoo
a679756eca
crypto speed test is pretty useless, removed it. 2014-08-06 20:56:27 -04:00
irungentoo
c4f0650ae3
Fixed const related warnings. 2014-07-02 16:04:41 -04:00
Marc Schütz
8391417f61 Const correctness for toxcore/Messenger.c and related files 2014-06-30 21:26:50 +02:00
Tux3 / Mlkj / !Lev.uXFMLA
3044bd8101 Fix CppCheck style errors
#if 0 the content of toxav/msi.c : int stringify_message(MSIMessage
*msg, char *dest)
This function has no effect and does not seem to be used for actively
waiting.

Fix various other style errors, reduce scope when possible, avoid
redundant writes, clarify operator priorities, etc.
2014-06-20 21:43:21 +02:00
irungentoo
3c64c87ea7
dns3_test now automatically does the DNS request.
tox_decrypt_dns3_TXT no longer needs id_record to be null terminated.
2014-06-19 10:50:46 -04:00
irungentoo
d6a9ce3175
Fixed some issues in toxdns and added a test.
Added request_id.

request_id must be obtained with tox_generate_dns3_string, stored,
then passed to tox_decrypt_dns3_TXT when we want to decrypt the
received response.
2014-06-14 11:31:56 -04:00
irungentoo
c49d74a125
Attempt fix of tox_sync not building on some systems. 2014-06-13 05:38:19 -04:00
irungentoo
07936960df
Astyle and fixes. 2014-06-10 18:35:55 -04:00
Marc Schütz
99d5940140 Const correctness in various interdependent files 2014-06-10 20:54:48 +02:00
irungentoo
7a11c10429
Fixed some nTox bugs. 2014-06-08 09:21:37 -04:00
liuguangzhao
9aa28c10b8 fix nTox cmdline input slow problem. 2014-06-08 14:08:52 +00:00
irungentoo
1bad0b5eea
Fixed TOX_MAX_MESSAGE_LENGTH define.
Removed some useless code from toxcore.

Astyled core code with new version of astyle.
2014-06-01 18:55:52 -04:00
Maxim Biro
24c6db5968 Fixed the undefined reference to pow error 2014-05-31 13:16:08 -04:00
irungentoo
89bf08287d
Renamed tox_do_run_interval to tox_do_interval.
tox_do_interval now returns a time in ms based on how much action
is going on in net_crypto.
2014-05-30 23:01:17 -04:00
irungentoo
0e814904e4
Replaced tox_wait* functions with tox_do_run_interval().
Build system fixes.
2014-05-30 13:20:36 -04:00
irungentoo
ec25f64407
Fixed Tox sync. 2014-05-28 18:27:35 -04:00
irungentoo
8e24771fc4
Remove Lossless UDP (This breaks Tox.) 2014-05-02 10:36:48 -04:00
irungentoo
0559904ea2
Updated some files so that they could build with latest core.
Fixed some issues.
2014-04-23 12:29:24 -04: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
irungentoo
4f1e02bafa
tox_group_get_names now returns a list of name lengths along with the list of names.
TCP test now also tests pings.
2014-03-31 20:37:03 -04:00
Jin^eLD
70475d281d Fix NaCl builds for *BSD
From what I see there is a difference between *BSD and Linux when
linking vs. toxcore which has been bulit vs. the NaCl library:

on Linux it only links if NaCl's object files (i.e. randombytes.o) is
present in the linker options, however on *BSD systems this will cause a
linking error, see:
https://github.com/Tox/toxic/issues/31#issuecomment-38224441

This commit makes sure that we do not add the NaCl object files to our
pkg-config settings on *BSD, but do add them on Linux.
2014-03-23 02:05:57 +01:00
irungentoo
f7beb70fe9 nTox fixes.
Added TOX_MAX_MESSAGE_LENGTH to tox.h
2014-03-18 20:45:03 -04:00
irungentoo
5770a0e29a Merge branch 'api-fix'
Main changes:
1. Strings no longer need to be NULL terminated.
2. tox_get_friend_id is now named tox_get_friend_number.
3. The friend request callback function is now (Tox *tox, uint8_t *,
uint8_t *, uint16_t, void *), the Tox object pointer has been added to
it.
2014-03-18 20:02:50 -04:00
irungentoo
5babb281c0 Friend request callback now contains the Tox object. 2014-03-16 13:24:39 -04:00
Kelong Cong
a13de8b105 updated compilation and execution instructions for Lossless UDP tests, and fixed minor typos 2014-03-12 21:40:52 +00:00
seshagiriprabhu
9bb27fbea6 bound checking in messenger testing 2014-02-25 22:18:27 +05:30
seshagiriprabhu
bcb393d336 Added bound checking for friend ID input in DHT test 2014-02-25 21:21:21 +05:30
Maxim Biro
5a142bb697 Renamed dht server to dht node 2014-02-22 17:07:15 -05:00
irungentoo
554afe11d7 Some api changes. 2014-02-21 11:38:04 -05:00
irungentoo
7a2ed25d36 Astyled and removed some useless files. 2014-02-09 09:43:16 -05:00
Maxim Biro
3782213b6e Fixed build 2014-02-09 03:22:24 -05:00
Maxim Biro
ecbceac341 Fixed memory leaks and removed repeated code 2014-02-09 02:01:04 -05:00
Maxim Biro
5fad72b910 Modified hex_string_to_bin 2014-02-09 00:58:15 -05:00
irungentoo
15d01ca746 Updated DHT server list with onion supporting DHT servers.
Onionised DHT_test.
2014-01-20 15:20:17 -05:00
Ben Iofel
174cec7f15 proper windows preprocessor detection 2014-01-19 19:30:14 -05:00
irungentoo
a6d5a54c79 Fixed ntox building on windows. 2013-12-19 12:36:51 -05:00
irungentoo
15d17b0a3c Astyled the code. 2013-12-16 20:49:24 -05:00
irungentoo
7cd43ecc76 Merge branch 'master' into harden 2013-12-06 22:51:17 -05:00
AZ Huang
2cb7f24132 Fix typo. 2013-11-29 23:38:06 +08:00
AZ Huang
8419d3469a Fix API name consistency. 2013-11-29 23:12:07 +08:00
AZ Huang
eec31edb1c Fix return code inconsistency. 2013-11-29 18:26:09 +08:00
Coren[m]
26fef7cf9a
Various changes to nTox including a potential crash (also possible from remote!), and a tiny change to toxcore.
Crash stuff:

nTox.c:
- do_refresh(): avoid crashes (input a "%" and the client goes "boom!", send someone a string with embedded "%" and see him blow up...)

Other stuff:

toxcore: tox.h (doc.)/network.c (code):
- networking_wait_prepare(): return -1 if lenptr was NULL and therefore not settable

nTox.c:
- fraddr_to_str(): function to convert a TOX_FRIEND_ADDRESS into a segmented (and therefore line-breakable) string
- print_friendlist(): print index of friend on name line, print id on 2nd line
- command /f: skip spaces (and +) inside a friend id
- command /r (new): "/r #" to remove a friend
- main(): reduce cpu consumption if we're not currently sending files
2013-11-27 21:00:23 +01:00
Coren[m]
a204b95c51
Print a more detailed message on CHAT_CHANGE_PEER_DEL, so a user isn't confounded by the change of peer numbers.
On deleting the last peer, it's just a delete.
On deleting any other peer, the last peer is moved into that space, gaining a different number.
Print that detail where appropriate.
2013-11-26 18:55:11 +01:00
Coren[m]
e85e9dbb99
group_namelistchange(): for ui reasons, divulge the peernumber and the nature of the change (add, del, name change).
tox.*, Messenger.*, group_chats.*:
- expand interface of callback by peernumber/change

groupchats.c:
- call callback in addpeer/delpeer/setnick with peernumber and flag

nTox.c:
- print_groupchatpeers(): print as many names on a line as possible, not one peer per line
- print_groupnamelistchange(): only print the change, if possible (i.e. "new peer", "peer's new name")
- added command "/p" to print the list of peers
2013-11-24 21:12:26 +01:00
irungentoo
f21a9a7666 Added callback that tells you when the peer name list of a group chat changes. 2013-11-23 17:19:02 -05:00
irungentoo
d2b56faded Added function to get the number of peers and list of names for group chats. 2013-11-22 23:31:55 -05:00
Coren[m]
ca621bd440
Wrapping: Expanded space of output to be a bit larger than input. Basic wrap(): Embed continuation markers if there's enough space. 2013-11-14 02:45:37 +01:00
Coren[m]
bde536f6bc
Add a "conversation mode", where you set your conversation partner once and then all non-commands are sent as message to them.
/cf # rsp. /cg # sets, /cr resets target

Also reformatted display of sent group message slightly to look less beta-ish.
Then using "#<num>" for group number vs. "<num>" for friend/peer numbers.
Also changed to a slightly different message on people without name.
2013-11-13 22:34:02 +01:00
irungentoo
244c625e51 Merge branch 'group_peername' of https://github.com/FullName/ProjectTox-Core into FullName-group_peername 2013-11-12 19:41:52 -05:00
Coren[m]
6d31a9be7e
Group chat: Add a nickname message. Remove strange default nickname. (Seriously...)
group_chats.*:
- group_send_nick() to send own name
- setnick() to store a received name

Messenger.c:
- group_send_nick() before group_sendmessage() (in regular intervals, to inform new peers)

nTox.c:
- print_groupmessage(): on error or on a name of length zero the result of tox_group_peername() isn't null-terminated, catch that
2013-11-12 19:57:01 +01:00
Coren[m]
e457eb6635
Undo faulty newlines, undo extra newlines. 2013-11-12 14:17:48 +01:00
Coren[m]
553aba0498
nTox.c:
- multiple places: tox_getname() doesn't terminate the string, make sure nTox does
- format_message():
.  - renamed to print_formatted_message()
.  - changed semantics: does the new_line() itself, saves caller from freeing the buffer (which no caller did)
.  - changed signature: now also prints the friend's name when sending
.  - intern: date is only printed once, the message line gets only time
- print_message(): enforce null termination
- main():
.  - setlocale() to init locale (for date/time printing)
.  - own name: ensure null termination

Messenger.c:
- notify of friend name change *before* the old name is overwritten
2013-11-11 15:25:54 +01:00
irungentoo
4943054742 Fixed small issues.
DHT_test now only prints non zero entries.
2013-11-10 17:57:24 -05:00
irungentoo
ce29937b8d Added more printing to DHT_test, fixed typo. 2013-11-10 14:55:36 -05:00
Coren[m]
4993928888
Started as a simple bugfix for wrap(), expanded to more detailed help.
nTox.c:
- flag[]: additional flag for special wrapping
- help expanded and split (to keep below 256 chars)
- new_lines_mark(): stores flag for special wrapping
- print_friendlist():
.  - extracted pattern for output
.  - added length of id string allocation
.  - replaced '\t' with '+ ', wrappers don't account for '\t'
- line_eval():
.  - removed a few do_refresh() directly after a new_lines() (calls do_refresh() at its end)
.  - 'h' (help): parsing of an additional character for f(riend) or g(roup)
- wrap():
.  - the major bugfix:
.    - no more endless looping if the input had a substring with no spaces
.      for more than line_width (e.g. ID of 78 and window smaller than 78)
- wrap_bars(): wrap() for "rich" messages, honors embedded '\n', breaks preferable at '|'
- print_help(): listed all options and added explanations
- print_invite(): fixed minuscule typo
- main(): made print_help() reachable again

nTox.h:
- majorly cut down to what is really needed
2013-11-10 19:06:17 +01:00
irungentoo
8e0ab68d30 Removed define that could become confusing. 2013-10-24 13:34:04 -04:00
irungentoo
55dececf90 Code cleanups.
Fixed some tests.
2013-10-23 14:49:59 -04:00
irungentoo
9303c18b0c Merge branch 'Cleanup-defines' of https://github.com/FullName/ProjectTox-Core into FullName-Cleanup-defines 2013-10-20 15:12:46 -04:00
Coren[m]
a0f08839bd Main: Eliminate TOX_ENABLE_IPV6 (then always on), CLIENT_ONETOONE_IP (then always off).
Additionally (besides cleanups):

network.h/tox.h:
- WIN32: fix a strange sa_family_t definition
- WIN32: define EWOULDBLOCK to WSAEWOULDBLOCK
- WIN32: kill macro for an existing function (IN6_ADDR_EQUAL)

network.c:
- use EWOULDBLOCK instead of EAGAIN (same value, but EWOULDBLOCK is more "popular")
- new_networking(): only try to enable IPv4-in-IPv6 if it's not already enabled per default
- inet_ntop()/inet_pton(): WIN32: remove partial initializers in favor of a simple memset()
- ip_equal(): WIN32: use an existing function
- logging: networking_wait_execute(): only dump result if not timeout
- logging: loglogdata(): kill an unused variable

LAN_discovery.c:
- send_broadcasts(): re-enabled, can only support IPv4 by principle, split into fetch_broadcast_info() (to fetch the addresses once) and send_broadcasts() (actual sending)

DHT.c:
- DHT_load_state_callback(): enclosed a fprintf(stderr, ...) into #ifdef DEBUG

Lossless_UDP.c:
- change_handshake(): harden against strange sa_family_t definitions

Messenger.c:
- logging: fix ID to string conversion

util.c:
- logging: eliminate a signed-warning
2013-10-20 16:56:12 +02:00
Antonio Montes
de696c1db6 Removed unnecessary #if 2013-10-19 11:34:41 -07:00
Antonio Montes
3df81b07f3 fixed build errors on windows 2013-10-19 11:14:03 -07:00
Jin^eLD
07d334bbe3 Do not build tox_sync on win32 2013-10-16 18:03:33 +02:00
mannol
5bc2560904 tox A/V: integration of A/V code into tox
Also-by: Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
2013-10-13 16:40:15 +02:00
irungentoo
4aa507b664 Added function to get the piece size for sending files. 2013-10-08 18:55:35 -04:00
BtbN
8d40ddf417 Some configuration/build fixes, so building basicaly everything else than the library can be disabled 2013-10-07 02:01:16 +02:00
irungentoo
6ef2b5ead6 Code cleanups. 2013-10-06 17:40:23 -04:00
irungentoo
97f192969c Fixed warnings. 2013-10-05 11:24:30 -04:00
irungentoo
ac117322a9 Tox sync added.
Tox sync is a proof of concept bittorrent sync inspired application that
uses tox to sync the contents of two folders.

Currently only works on POSIX compilant operating systems.
2013-10-05 11:14:06 -04:00
irungentoo
fbd494a8b4 File sending added to public api. 2013-10-02 20:53:24 -04:00
irungentoo
6425cf3b53 File control packets can now be used by the person sending the file. 2013-10-02 20:08:14 -04:00
irungentoo
6182af8449 nTox updated with changes in core, some file sending things fixes. 2013-10-01 18:59:33 -04:00
irungentoo
3c7de51ba5 Basic ntox file sending. 2013-09-30 13:13:49 -04:00