Commit Graph

2371 Commits

Author SHA1 Message Date
Sean
05a05400ed echo is useless 2013-11-20 13:40:16 -08:00
Sean
c34e68eacb Fixed "'" 2013-11-20 13:36:13 -08:00
Sean
96fd7ef327 Fixed that 2013-11-20 13:23:49 -08:00
Sean Qureshi
d72613e28a No one actually gives a shit about seeing this, so lets actually be able to see useful stuff 2013-11-20 13:05:29 -08:00
irungentoo
6b7f282c47 Merge pull request #656 from Jman012/master
Added functions tox_count_chatlist and tox_copy_chatlist.
2013-11-19 17:11:49 -08:00
Jman012
ace8c2289e Fixed a cuple stylistic bugs. Behaviour should be the same but the code is now proper. Also fixed tox_copy_friendlist. 2013-11-19 16:45:49 -08:00
Jman012
478d799ee3 Added null check to each chat before incrementing. 2013-11-19 11:44:26 -08:00
irungentoo
55fa67e980 Merge pull request #657 from fr0stycl34r/patch-1
Fix instructions
2013-11-19 10:04:59 -08:00
cl34r
6bd77a2549 Fix instructions
sudo echo "/usr/local/lib/" >> /etc/ld.so.conf.d/locallib.conf doesn't work so well... echo '/usr/local/lib/' | sudo tee -a /etc/ld.so.conf.d/locallib.conf should work better.
2013-11-19 12:48:12 -05:00
irungentoo
64aff6bb85 Fixed possible issue. 2013-11-19 11:18:30 -05:00
Jman012
21e514572c Fixed a few typos. 2013-11-18 20:10:07 -08:00
Jman012
37d9728830 Added functions tox_count_chatlist and tox_copy_chatlist.
These functions are akin to the tox_count_friendlist and tox_copy_friendlist, made available on the public API.
2013-11-18 20:05:35 -08:00
irungentoo
cdfe09d221 Merge pull request #650 from FullName/ID-IP-basic
Significantly trimmed down version of an ID<=>IP cache.
2013-11-18 18:02:29 -08:00
irungentoo
1473126f9a Nodes now only send good nodes (or the node that was specifically asked for). 2013-11-17 19:51:15 -05:00
irungentoo
26efa858ec Merge pull request #652 from FullName/reset_on_long_timeout
Tolerate instable connectivity.
2013-11-17 16:45:34 -08:00
irungentoo
067cc9630a Fixed segfault. 2013-11-17 16:23:28 -05:00
Coren[m]
81b472df0d
Tolerate instable connectivity: if *all* set close nodes are in terminal timeout (KILL_NODE_TIMEOUT), reset them all to BAD_NODE_TIMEOUT.
That keeps the client trying to at least ping the nodes in the hopes of the connection coming back up.
2013-11-17 19:44:51 +01:00
irungentoo
a82ad576a2 Fixed build error on windows. 2013-11-16 21:21:32 -05:00
irungentoo
d83abccf0e Send our name when someone new joins the group chat. 2013-11-16 20:14:01 -05:00
Coren[m]
b132c92b3a
Assoc's array is now allocated dynamically and per default much smaller (320 entries).
id_hash() was not at all working as expected for very small bucket size (when (size / 4) was zero). Simplified to be trivially correct.
Also added a used flag on adding an entry, which is set by callers if they have that association in active use. Those get priority over unused entries on collision.
Fleshed out test to be at least elementary useful.
Each group chat now uses an own, small assoc (80 entries).
2013-11-17 01:05:00 +01:00
irungentoo
da21a8f844 Merge pull request #651 from FullName/ntox-wrap-basic-with-continuation
Basic wrap(): Embed continuation markers if there's enough space.
2013-11-15 16:33:21 -08:00
irungentoo
706b6ec11c Merge pull request #649 from FullName/DHT-client_id-change-wipe-other-address
On replacing a client with another, clear the stale association.
2013-11-14 13:02:08 -08:00
Coren[m]
0d8329b3a9
Significantly trimmed down version of an ID<=>IP cache.
Besides acknowledging timeouts, the module isn't trying to do anything fancy with the data besides storing and retrieving.
2013-11-14 19:05:53 +01: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
irungentoo
3af83a6aec Merge pull request #648 from FullName/LAN_ip-ip6-loopback-is-local
IPv6 address of ::1 is local.
2013-11-13 16:03:13 -08:00
irungentoo
926dc327e9 Merge pull request #647 from FullName/ntox-conversations
Add a "conversation mode", where you set your conversation partner once ...
2013-11-13 16:02:04 -08:00
Coren[m]
28dcfae6e4
On replacing a client with another, clear the stale association.
Also check both associations for timeout, not just the incoming one.

Also removed client_in_list(): static & unused.
2013-11-14 00:45:17 +01:00
Coren[m]
0f2c2fe399
IPv6 address of ::1 is local. 2013-11-13 23:51:19 +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
5e6fbf33b5 Cleaned up the code. 2013-11-12 20:59:32 -05: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
irungentoo
62125ce90f Merge pull request #645 from FullName/nTox-patches
nTox: enforce friend name null termination, reduce memory loss, allow nickchange as oldname=>newname
2013-11-12 12:50:54 -08: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
irungentoo
18c98eb87d Fixed possible segfault. 2013-11-11 13:42:09 -05:00
Coren[m]
81d4e4d2b8 Merge remote-tracking branch 'upstream/master' into nTox-patches 2013-11-11 15:28:15 +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
ba000a2424 Merge pull request #643 from FullName/nTox-patches
Started as a simple bugfix for wrap(), expanded to more detailed help.
2013-11-10 16:45:33 -08:00
irungentoo
0a3f1f3aee Fixed test. 2013-11-10 19:45:24 -05: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
irungentoo
57763f2737 Merge branch 'master' into harden
Conflicts:
	toxcore/DHT.c
2013-11-10 14:32:46 -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
572fb60392 Optimized data sending slightly more. 2013-11-09 22:29:16 -05:00
irungentoo
e30105af20 Code cleanups. 2013-11-08 21:01:20 -05:00
irungentoo
e1b215cfa9 Merge branch 'add2lists_forward' of https://github.com/FullName/ProjectTox-Core into FullName-add2lists_forward 2013-11-07 17:39:10 -05:00
irungentoo
a980f46465 Merge pull request #642 from FullName/dht_handle_sendnodes_unify
Unify most of handle_sendnodes[_ipv6]() into a common core.
2013-11-07 14:19:11 -08:00
irungentoo
af62804c94 Merge pull request #641 from FullName/autotests_reduce
Reduce duplicate data. Add a mostly empty skeleton test.
2013-11-06 17:43:37 -08:00
irungentoo
4bf4b3f47c Merge pull request #640 from FullName/logging_fixes
Behind #define LOGGING: Correct usage of now() to replacement unix_time().
2013-11-06 15:44:52 -08:00
Coren[m]
b060d87483
Unify most of handle_sendnodes[_ipv6]() into a common handle_sendnodes_core(), leave only a minimal trail. 2013-11-06 21:55:22 +01:00