Commit Graph

33 Commits

Author SHA1 Message Date
Jan Vidar Krey abd097acf0 This is a somewhat risky patch, but it has been intended for quite some time:
Remove the libevent handler for write events, only use one common event handler for both reading and writing.
2009-07-09 17:03:31 +02:00
Jan Vidar Krey 98bffd93e9 Fix stupid crash on empty command. 2009-07-01 11:31:55 +02:00
Jan Vidar Krey e53119e92c Server did not answer due to wrong checks. 2009-07-01 09:50:46 +02:00
Jan Vidar Krey ee0ea5a427 Crash fix. 2009-06-30 22:15:08 +02:00
Jan Vidar Krey 4abdc3edbd Cleanup read/write socket handling somewhat. 2009-06-23 01:57:26 +02:00
Jan Vidar Krey 8f0943621e Dont set socket buffers. 2009-06-22 21:13:41 +02:00
Jan Vidar Krey 155350b61b Fixed crash bug #33 2009-06-22 21:05:02 +02:00
Jan Vidar Krey 1c58120c03 Oportunistic write. 2009-06-22 20:25:22 +02:00
Jan Vidar Krey 1d9acece34 Ensure we set a max recv and send buffer per user, and that it does not
exceed the one used internally by the application.
2009-06-22 19:50:10 +02:00
Jan Vidar Krey b2d543d433 Started work on SSL 2009-06-22 18:44:07 +02:00
Jan Vidar Krey ea3cd1bd90 Work on optimizing send(), to use fewer send function calls. 2009-06-21 14:21:34 +02:00
Jan Vidar Krey 7f24238ab5 Disable sendq debugging. 2009-06-20 22:46:11 +02:00
Jan Vidar Krey b1ab64242e Renamed a function. 2009-05-28 01:48:31 +02:00
Jan Vidar Krey 860310caff Massive restructuring. 2009-05-26 21:05:06 +02:00
Jan Vidar Krey 8167d79f5a Large reorganizations of the code base. 2009-05-26 19:46:51 +02:00
Jan Vidar Krey 9309c925d3 Started working on new pipelines for sending and receiving data.
This will be useful for the next step; SSL.

(NOTE: This code is very chatty about debug messages)
2009-05-19 22:57:50 +02:00
Jan Vidar Krey aa18ac047d Crash fix 2009-05-19 09:38:57 +02:00
Jan Vidar Krey 1dbf2640d2 More API fixes; remove implicit relationship between hub and user
in APIs.
2009-05-18 16:30:17 +02:00
Jan Vidar Krey 548867de10 Removed ADC_UDP_OPERATION code as it is not used or needed. on_kick is also gone. 2009-05-16 03:14:20 +02:00
Jan Vidar Krey 604364ffa5 Fixed various code deprecations
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-05-15 18:45:26 +02:00
Jan Vidar Krey 5d5dda2f9b Always obtain IP address during accept(), and not do it later as a call to getsockname().
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-23 15:05:27 +01:00
Jan Vidar Krey 1a1b5bdb38 Fixed nasty crash if a user sends a very large command to the hub.
Will overwrite heap memory.
Thanks to Toast who found this bug.

Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-21 02:58:53 +01:00
Jan Vidar Krey 669ab14022 Minor cleanups and stack reduction.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-19 01:27:34 +01:00
Jan Vidar Krey c671851be8 Cleaned up local event queue.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-18 02:56:49 +01:00
Jan Vidar Krey c29815ed62 Fixed compile warning. 2009-03-16 12:40:12 +01:00
Jan Vidar Krey 58e2982675 Fixed bug #1: Excessive send queue bug (corruption of the offset variable).
Low priority messages are not relayed if soft limit send queue is reached.

Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-16 12:28:58 +01:00
Jan Vidar Krey 4797d5ee90 SendQ debugging
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-14 02:09:45 +01:00
Jan Vidar Krey 5a0f01d1ec Don't assert, rather print error messages.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-13 17:07:06 +01:00
Jan Vidar Krey f6af8cf389 Merged changes from github.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-13 16:54:39 +01:00
Jan Vidar Krey 7337d9e1d1 Ensure the send queue offset is calculated correctly in case of a partial queued write.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-13 16:51:27 +01:00
Jan Vidar Krey 5a978d361c Added asserts in case send queue size goes below zero.
Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
2009-03-13 01:29:21 +01:00
Jan Vidar Krey 26766d8332 Optimization: Removed unneeded strlen() calls several places. 2009-03-02 19:41:49 +01:00
Jan Vidar Krey ac56e7a5b9 First git commit. 2009-02-19 17:14:09 +01:00