Commit Graph

2671 Commits

Author SHA1 Message Date
crs a81f573666 updates 2002-06-17 14:10:25 +00:00
crs fe16546a1d formatting changes. 2002-06-17 13:31:21 +00:00
crs 57fb87ad10 refactored ISocket into IDataSocket. the latter and IListenSocket
now derive from ISocket.
2002-06-17 12:02:26 +00:00
crs e3dcf7febf performance fixes on win32 plus clean up of some warnings. also
improved error messages when uninstalling service.
2002-06-14 18:08:20 +00:00
crs 21af7b2f17 added a blurb about synrgyhk.dll and that the service manager
will look for the binary wherever it was when --install was
used.
2002-06-11 20:10:49 +00:00
crs 2b07c8091c windows fixes needed for formatting changes. 2002-06-11 20:09:59 +00:00
crs c54d92b78f commented out half-duplex flags that should never have been
uncommented.
2002-06-11 18:33:03 +00:00
crs 88490de5a2 fixed bug with switching screens on primary when there's no
link in that direction (it would assert).  introduced bug
when adding support for wrapping.  now ignores attempts to
move in a direction with no link.
2002-06-11 18:31:06 +00:00
crs fba8063c17 added missing #include <signal.h>. 2002-06-11 18:30:08 +00:00
crs 62519b19fe indentation and other formatting changes. also cleaned up
#includes.
2002-06-10 22:06:45 +00:00
crs 68940e58f3 win32 changes. now including windows.h with WIN32_LEAN_AND_MEAN
to avoid including some stuff we don't want (like winsock).
2002-06-10 16:49:46 +00:00
crs 500990b153 fixes. 2002-06-10 11:09:02 +00:00
crs cf0805c93a updates. 2002-06-10 11:08:02 +00:00
crs afc8d6a9e7 added example files and a README. 2002-06-10 11:00:55 +00:00
crs 172fc7e5b3 now allowing a screen to be its own neighbor to allow wrapping.
also no longer warping mouse to 0,0 when setting server screen
info.  that was causing the mouse to jump if the server screen
had itself as its left or top neighbor (directly or indirectly)
once a screen could be its own neighbor.
2002-06-10 10:08:36 +00:00
crs 2ea3d66112 fixed stripping of comments from configuration streams. 2002-06-10 09:49:21 +00:00
crs 2e931a4fd9 changed "permitted" to "supported" in error messages. 2002-06-10 09:49:03 +00:00
crs 0a2f8547fc no longer camps if the server sends an error message. 2002-06-09 23:08:18 +00:00
crs 28afcddf62 added support for camping, i.e. repeatly trying to connect to the
server until we succeed.
2002-06-09 22:20:28 +00:00
crs 30a6a8b837 CTimerThread now allows zero and negative timeouts. a negative
timeout never times out and CTimerThread is a no-op.
2002-06-09 22:20:01 +00:00
crs db8165db09 now using ":0.0" as the display if DISPLAY isn't set. 2002-06-09 18:03:32 +00:00
crs e94be94a50 checkpoint. 2002-06-09 18:00:03 +00:00
crs 7ca4804667 added command line option to choose the screen name. also now
using the hostname as the default name.  this is on both client
and server.
2002-06-09 17:59:32 +00:00
crs c357180530 added FIXME comment. 2002-06-09 17:35:28 +00:00
crs 255e46017e fixed problem with setConfig(). if the new config didn't
include a screen that was already connected under an alias
then that screen wouldn't be disconnected and removed from
the screen list until the screen voluntarily disconnected.
at that time removeConnection() would assert because the
screen name would not be found.  now using the canonical
name in the protocol object as well as CServer.  this
allows setConfig() to always detect removed screens and
disconnect them.
2002-06-09 17:21:33 +00:00
crs a9910041b3 now exits instead of restarting if child dies due to an
unexpected signal.
2002-06-09 16:53:57 +00:00
crs 555aa19eb2 added command line and configuration file arguments to choose
the address and port to listen on or connect to.  changed the
default port and put it in ProtocolTypes.h.  the HTTP port is
now no longer opened unless the --http argument is supplied
or the config file includes it.
2002-06-09 16:53:25 +00:00
crs 8b2a282eb5 added aliases to configuration. an alias is another name for
a screen.  it's expected that the server will want to accept
a given client under several names (e.g. the hostname and the
FQDN).
2002-06-08 23:24:40 +00:00
crs 562e3aebb5 checkpoint. 2002-06-08 21:48:16 +00:00
crs 4b28ffc5b2 win32 changes. changed names of binaries. added support for
running as (and installing/installing) a service.  added
support for multiple desktops (NT only, 95 doesn't support
multiple desktops).
2002-06-08 21:48:00 +00:00
crs 5709d8ddef refactored some common platform dependent stuff into a new
library:  platform.  also removed test.cpp.
2002-06-04 12:26:23 +00:00
crs c3649df304 added command line parsing, restartability, and daemonizing to
client.  broke win32 stuff though.  also moved version and
copyright constants into a new file and renamed protocol
version constants.
2002-06-04 11:06:26 +00:00
crs e409c83ef9 fixed delete bug in printt -- when skipping file and line the
deleted pointer was wrong.
2002-06-04 11:03:34 +00:00
crs 3b872bb727 fixed timeout when getting selection -- forgot to set flag to
terminate event loop.
2002-06-04 11:02:33 +00:00
crs beda89fd53 changes to add command line arguments. also added automatic
restarting and daemonizing on unix.  daemon sends log messages
to syslog.  unix now reads config file from file named on
command line;  if no command line arg then uses effective
user's config file and if that's not there it finally tries
/etc/synergy.conf.  if there are no screens configured then
one is added for the primary screen.  broke some startup
stuff on win32.

also now timing out if X primary screen can't grab the mouse
and keyboard.  the server will just give up trying to switch
screens.  the grabs will fail is some other app has a grab
and won't release it.  note that kdm grabs the keyboard for
the duration that the login window is displayed, effectively
disabling synergy.
2002-06-03 18:53:18 +00:00
crs 10f4e94557 added a method to set the filter given a priority string (instead
of a number).  fixed a comment related to what those priority
strings are.  added a CLOG_PRINT priority which is never filtered
and suppresses the trace info and the priority level message.
it's intended as a way to output a message through the logger
without getting extra output.
2002-06-03 16:36:45 +00:00
crs 014b781fb0 moved case insensitive comparison utility functions into CString
from CHTTPProtocol.
2002-06-03 16:34:22 +00:00
crs 1cbdaee31b added better handling of X server disconnecting unexpectedly.
the apps still exit but they do it in a mostly controlled
manner.  in particular, the server threads except the one
processing primary screen events will terminate gracefully.
this will be important should the server ever allow HTTP
clients to rewrite the configuration file.

note that X makes it effectively impossible to continue once
the X server disconnects.  even if it didn't it would be
difficult for synergy to recover.  users will have to add
synergy to the X display manager's startup script if they
expect the server to be restarted.  alternatively, we could
add code to fork synergy at startup;  the child would do
the normal work while the parent would simply wait for the
child to exit and restart it.
2002-06-03 13:45:30 +00:00
crs ddbb465540 shortened poll() timeout. 2002-06-02 23:07:57 +00:00
crs ad15393732 changed buffered output stream to wait() when flush()ing instead
of polling/sleeping.  changed CTCPSocket to not use thread
cancellation but to instead use m_connected to exit the thread.
also shortened poll timeout.
2002-06-02 22:57:50 +00:00
crs 1e988b3839 make sleep shorter in poll/sleep getEvent() loops. 2002-06-02 21:35:20 +00:00
crs a541ebc557 removed poll/sleep code to improve performance. 2002-06-02 21:03:38 +00:00
crs 869617a34a now ignores key if there's no key mapped for a required modifier.
was asserting (on the wrong expression).
2002-06-02 19:04:24 +00:00
crs 1d3807cb0e added SIGINT and SIGTERM handling to unix client and server.
either signal causes the main thread to be cancelled.  added
necessary code to make main thread cancellation clean up
nicely.
2002-06-02 18:49:35 +00:00
crs 1da9be88c9 added a maximum request size to CHTTPProtocol so we can bail
on clients that cause us to use too much memory.  also put
methods in CHTTPRequest to get/set headers and changed the
data structure used to store them.  fixed a couple of other
miscellaneous bugs in CHTTPProtocol.cpp.
2002-06-02 13:34:35 +00:00
crs fa4d24216f now limiting number of simultaneous HTTP requests being handled
at once.  this is to prevent denial of service.
2002-06-02 11:49:46 +00:00
crs d2135af0d9 fixes, mainly for windows. first, had to add a notification from
CServer to the primary screen when the configuration changes so it
can make necessary adjustments (the win32 primary screen must tell
the hook dll about the new jump zones).

changed includes of some std c++ library files to go through
our own include files.  these wrap the include with stuff to
keep vc++ quiet when compiling at warning level 4, which is
what it does now.  it also works around missing <istream> and
<ostream> on g++2.96.

added missing std:: where necessary.  g++ doesn't really support
namespaces so it lets references without the namespace slip
through.

added workaround or fix.  not sure if istringstream::str(string)
should reset eofbit.  it does on g++ but does not on vc++.
added clear() after str() so it works either way.

added low-level keyboard hook to win32.  if available (it's only
available on NT SP3 and up) it allows us to catch and handle
alt+tab, alt+esc, ctrl+esc, and windows key hot keys.  i think
that leaves only ctrl+alt+del and accessibility functions
uncaught on those systems.
2002-06-01 19:26:11 +00:00
crs 1ac62a9533 added mutex to all public methods that didn't already have it.
fixed two blown assertions.  first, if user tried to switch to
a client that had connected but hadn't yet sent the first info
message it would assert on the zero size screen.  second, if
the primary screen was handling a mouse motion on behalf of a
secondary screen when that secondary screen disconnected then
an assert would blow because the primary screen would call
onMouseMoveSecondary() but m_protocol on the active screen is
NULL because disconnecting the active secondary screen caused
the mouse to jump to the primary screen.
2002-06-01 10:52:02 +00:00
crs 3a80df28dd changed iterator to use iterator_traits directly instead of
std::iterator to support the old STL on grace.
2002-05-31 18:35:53 +00:00
crs 793c968f00 server now rejects clients that are not in the configuration.
added a protocol message to indicate this.
2002-05-31 18:18:29 +00:00