Jan Vidar Krey
2f830d3132
Cleaned up error handling.
2012-10-17 15:39:48 +02:00
Jan Vidar Krey
5884983a2f
Return -1 as error for recv/send only to signal socket has closed, use a number < -1 for socket errors.
2012-10-17 15:02:32 +02:00
Jan Vidar Krey
c43acd97bd
Fixed accept/connect state event propagation.
...
Also removed some unused states and flags.
2012-10-17 09:25:15 +02:00
Jan Vidar Krey
b1f2c93738
Reworked the error handling of non-blocking reads and writes.
...
This should prevent busy loops where the socket is makred readable
but we are really only looking for it to become writable.
2012-10-17 09:16:02 +02:00
Jan Vidar Krey
50912bdf75
More work on splitting out OpenSSL specific bits.
2012-10-15 20:39:03 +02:00
Jan Vidar Krey
f3922bb3e0
Work on splitting out OpenSSL cleanly.
2012-10-12 14:24:03 +02:00
Jan Vidar Krey
f20c42d05f
Wrapped everything OpenSSL related in a SSL_USE_OPENSSL check macro.
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
69603ff70f
Add install make rule.
2012-10-09 14:36:14 +02:00
Jan Vidar Krey
3ea38c59af
Better reporting using the !stats command.
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
50292cb8c9
Update the network statistics every 10 seconds instead of 60 seconds.
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
e4fc91dde1
Made the network statistics work again.
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
8086d89e23
Better formatting of byte sizes.
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
cc2ead8136
Use util's format_size.
2012-10-09 10:20:58 +02:00
Jan Vidar Krey
10d8157477
Added a utility function to convert an arbitrary byte size into a human readable string.
...
E.g. 849484 becomes "829.57 KB".
2012-10-09 10:20:12 +02:00
Jan Vidar Krey
0a7cb86014
Fixed a crash in plugin mod_chat_only.
2012-10-09 10:02:08 +02:00
Jan Vidar Krey
2e8c99b7ec
Refurbished the ADC hub stress-tester tool; adcrush
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
cb6236691b
Added more functionality to the ADC client test code.
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
5136525abc
Added API to construct ADC messages with source and destination.
2012-10-02 23:59:11 +02:00
Jan Vidar Krey
07da142e65
Only enable the C compiler (no C++ compiler required).
2012-10-05 09:09:54 +02:00
Jan Vidar Krey
aa21556600
Use correct source directory for building outside of source.
2012-10-04 22:00:30 +00:00
Tillmann Karras
16ee65422d
Fix cbuffer initialization
...
If no data was appended, cbuf_get() would return a pointer to
uninitialized memory. Now it returns a pointer to a string of zero
length.
2012-10-03 22:40:33 +02:00
Jan Vidar Krey
f0b11dadf1
Refurbished adcrush (hub stress tester).
2012-10-03 13:51:07 +02:00
Jan Vidar Krey
61073bd304
Fix rare protocol parse error due to incorrect recv queue handling.
2012-10-03 13:49:50 +02:00
Jan Vidar Krey
20a847e1b4
Moved the ipcalc code to the network directory.
2012-10-03 12:59:05 +02:00
Jan Vidar Krey
a90807fccb
Fix version auto generation.
2012-10-03 12:02:35 +02:00
Jan Vidar Krey
25c82076da
Cmake fixes, build adc client and link uhub with pthread if sqlite3 is used.
2012-10-03 11:45:21 +02:00
Jan Vidar Krey
089966d918
Fix ADC client send queue.
2012-10-03 11:44:07 +02:00
Jan Vidar Krey
e95a892fb7
MSVC compile warnings fixed.
2012-10-02 22:47:43 +02:00
Jan Vidar Krey
564f09ad65
Update the CMake minimum version to 2.8.3
2012-10-02 20:16:30 +00:00
Jan Vidar Krey
a33851b13d
fixup! Updated .gitignore
2012-10-02 21:54:56 +02:00
Jan Vidar Krey
20e445bf94
Updated .gitignore
2012-10-02 21:49:25 +02:00
Jan Vidar Krey
133707ef57
Removed the VS2010 project files. Use CMake instead.
2012-10-02 21:43:58 +02:00
Jan Vidar Krey
62d14a9c52
Plugin compile fixes for windows systems.
2012-10-02 21:42:58 +02:00
Jan Vidar Krey
ab9dda1c61
Some fixes for CMake on Windows.
...
Tested successfully with NMake.
2012-10-02 21:38:45 +02:00
Jan Vidar Krey
37e78eada1
Replaced the GNU makefiles with CMake.
2012-10-02 15:49:27 +02:00
Jan Vidar Krey
5b4467acd5
Minor stuff on the uhub-admin tool based on the changes in the ADC client code.
2012-09-28 15:52:39 +02:00
Jan Vidar Krey
ff2e2a3d4c
Misc ADC client fixes.
2012-09-28 15:51:39 +02:00
Jan Vidar Krey
a599b29b9d
Added more complete API for dealing with ADC messages.
...
- Added a construct method which would take a fourcc and a source.
- Added an unescape function that would write into pre-allocated memory.
2012-09-28 15:49:46 +02:00
Jan Vidar Krey
fc52f0e030
Renamed the hub_sendq and hub_recvq to ioq_send and ioq_recv.
2012-09-28 09:24:04 +02:00
Jan Vidar Krey
35bfefa717
Fix debug output typo.
2012-09-27 15:29:19 +02:00
Jan Vidar Krey
845aefc941
Decouple hub and user manager more cleanly.
2012-09-27 15:29:00 +02:00
Jan Vidar Krey
4fcf3ffc83
Add support for configuration options that depend on certain #ifdefs.
2012-09-27 15:28:46 +02:00
Jan Vidar Krey
ac39ebf38a
Merge pull request #10 from blairbonnett/fix-check-escapes
...
Fix msg_check_escapes() so it allows escaped backslashes.
2012-09-17 11:49:14 -07:00
Blair Bonnett
3f777ce5e2
Fix msg_check_escapes() so it allows escaped backslashes.
...
If a valid escape (\n, \s, or \\) is found, increment the pointer
marking the start of the next search so we don't start looking at the
escaped character. The old behaviour was a problem for messages
containing slashes -- the escaped slash would be looked at in the next
pass and so the following character would be treated as an escape,
causing the message to be dropped for having "an invalid ADC escape".
2012-09-17 23:31:20 +12:00
Jan Vidar Krey
b0aa690cb4
Merge branch 'master' of github.com:janvidar/uhub
2012-08-07 11:56:40 +02:00
Jan Vidar Krey
fb11589bb0
Drop all ADC messages containing illegal ADC escapes.
2012-08-07 11:55:29 +02:00
Jan Vidar Krey
03c4292eea
Merge pull request #8 from blairbonnett/upstart
...
Upstart script to run uhub as a service
2012-07-29 15:34:07 -07:00
Jan Vidar Krey
ccaf755da3
Merge branch 'master' of github.com:janvidar/uhub
2012-07-30 00:08:38 +02:00
Jan Vidar Krey
cba0121574
ADCH++ had a security bug that allowed UCMD extension to be relayed.
...
uhub did not have this security bug since the hub did not advertise support for the
UCMD extension, but the message was still correctly relayed as specified in the
protocol specification.
However, this commit adds support for the UCMD extension, but only to the extent
that uhub will advertise it and uhub will also drop any such CMD message
generated by a client and will (currently) never issues a CMD message by itself.
2012-07-30 00:08:12 +02:00
Blair Bonnett
166a105e33
Add upstart script to run uHub as a service.
...
Start and stop conditions are based off the OpenSSH upstart script which
ships with Ubuntu.
2012-07-29 16:22:38 +12:00