Commit Graph

41 Commits

Author SHA1 Message Date
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
76dfccf2d6
Ported some tests to the new api. 2015-02-25 21:09:14 -05: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
pyruvate
ec9082f2c3 Remove DEFTESTCASE and DEFTESTCASE_SLOW redefinitions 2014-08-09 11:33:20 +03:00
irungentoo
38ebfc2989
Fixed one test. 2014-05-02 21:44:09 -04:00
irungentoo
496d4fe203 Fixed a test.
Removed function from Messenger.h
2014-04-21 16:54:47 -04:00
irungentoo
50d2b45541 fixed build. 2014-02-22 11:52:46 -05:00
Maxim Biro
ecbceac341 Fixed memory leaks and removed repeated code 2014-02-09 02:01:04 -05:00
irungentoo
c51b8a9eba Added function to save an encrypted version of the messenger.
Also added some tests.
2013-12-21 22:35:27 -05:00
irungentoo
0a3f1f3aee Fixed test. 2013-11-10 19:45:24 -05:00
irungentoo
55dececf90 Code cleanups.
Fixed some tests.
2013-10-23 14:49:59 -04:00
Coren[m]
1331a32223 Broken *_wait() into *_wait_prepare() and *_wait_execute()
To allow the actual waiting to run without any locking, split it into preparing the data it uses and the execution of the wait.
The caller must provide with the buffer to store whatever data it requires to wait.
Completely eliminates any reliance on the existence of anything but that data in the actual wait routine.

Also fixed a few argument type warnings inside LOGGING.
2013-10-05 12:53:54 +02:00
Coren[m]
6fe25e4f6f Permit -Wshadow as useful warning. 2013-09-27 11:24:33 +02:00
irungentoo
5a83c1296c astyled everything. 2013-09-17 16:28:39 -04:00
Coren[m]
1c57a3a3de Tests of state loading/saving lead to two fixes for DHT.c and util.c
util.c:
- fix in empty section at the end of the state, showed as bug when having an empty name

DHT.c:
- fix in saving less data than originally announced, showed as bug when not having reached any clients ever (no clients or only with timestamp of zero)
2013-09-17 01:08:57 +02:00
Coren[m]
513e37815d tox.h, DHT.h:
- tox_bootstrap_ex(), DHT_bootstrap_ex() renamed to tox_bootstrap_from_address(), DHT_bootstrap_from_address()
- (handle_)sendnodes_ex() renamed to (handle_)sendnodes_ipv6()
- only sending sendnodes_ipv6() if we're actually IPv6 enabled
- changed comments to conform better

nTox.c, Messenger_text.c, DHT_test.c, DHT_bootstrap.c:
- fallout from *_ex() to *_from_address()

DHT_bootstrap.c:
- corrected a potentially wrong info message

util.c:
- fixed logfile name: now (funcptr) => now() (number)

network.c:
- addead comment about the necessity of bind() to succeed

auto_test/messenger_test.c:
- defaulting ipv6enabled to TOX_ENABLE_IPV6_DEFAULT

LAN_discovery.c:
- slight cleanup and comments for clarity
2013-09-11 20:50:15 +02:00
Coren[m]
0139f2838f Merge remote-tracking branch 'upstream/master' into Integration 2013-09-11 00:16:15 +02:00
irungentoo
55499933be Fixed building with NaCl. 2013-09-10 17:15:26 -04:00
Coren[m]
05d7b157c6 tox.*, Messenger.*:
- initialisation: argument added to enable/disable ipv6 as socket

Messenger_test.c:
- initialisation: ipv4 hardcoded for now
- delegating IP resolution to DHT_bootstrap_ex()
2013-09-09 21:03:31 +02:00
Maxim Biro
f7e14e5c6f Modified test 2013-09-07 16:05:48 -04:00
irungentoo
64570a1b12 Fixed autotest, increased MAX_STATUSMESSAGE_LENGTH. 2013-09-06 09:56:56 -04:00
irungentoo
871a64197b Properly fixed test. 2013-08-31 12:49:22 -04:00
irungentoo
0181fd95ae Fixed test. 2013-08-31 12:28:15 -04:00
jin-eld
e658892793 Rename core directory because of autoconf name clash
While doing the checks configure might generate "core" files and will
then try to remove them. Having a "core" directory generates an error
while runing the configure script.

There's no workaround but to rename the core directory.
2013-08-24 03:25:07 +03:00
Sean Qureshi
1986e6b7f4 Ran it through astyle 2013-08-18 01:48:36 -07:00
Florian Hahn
2e90691f4c Add test for getname 2013-08-17 23:23:54 +02:00
Florian Hahn
a385c79cfe Use ck_assert_msg 2013-08-17 23:02:36 +02:00
irungentoo
88ff81d9de Passed everything through astyle. 2013-08-16 13:11:09 -04:00
irungentoo
a8d1f86f8b ... 2013-08-13 20:37:09 -04:00
irungentoo
c8a46e1c09 ... 2013-08-13 20:32:45 -04:00
irungentoo
7d588ef8bd Fuck. 2013-08-13 20:31:41 -04:00
irungentoo
3c35db104a Commented out old tests that are broken with current master. 2013-08-13 20:22:44 -04:00
irungentoo
e7d002fbc0 Hackish fix for the tests. 2013-08-13 20:02:07 -04:00
irungentoo
63efa44dfa Attempt to quickly fix a test. 2013-08-13 19:36:02 -04:00
Andreas Schneider
6b06431e9b core: Fix a possible buffer overflow using getself_name().
If the passed buffer is smaller than MAX_NAME_LENGTH then, you
will probably overflow it.
2013-08-13 09:50:51 +02:00
Chris Hall
4293c4b1e6 Messenger refactor - redid work from pull request 79
Moves static state out of Messenger.c and into a Messenger struct
Purely stylistic, no functional changes were made.

This commit also changed all the callers of Messenger as they now have
to pass an instance of the Messenger struct to messenger functions.

Also removed some uses of the 'static' keyword at the beginning of
function definitions when the function was already declared static, as
these caused gcc to whine.
2013-08-12 21:37:38 +12:00
Christian Brueffer
0b8fa72914 Fix a recurring typo in code and comments. 2013-08-09 14:01:35 +02:00
Florian Hahn
c171aad7c9 Disable failing test assertion 2013-08-08 13:04:15 +02:00
Maxim Biro
338da1fde7 Fixed auto tests 2013-08-07 20:37:34 -04:00
charmlesscoin
64b05c0960 Cleanup test and work on .travis file 2013-08-07 04:04:16 -04:00
charmlesscoin
4b34ecf913 added files for unit tests 2013-08-07 00:18:27 -04:00