XOP-113: Modify Unixext.fold_lines to avoid stack overflow.

This was found during Sanibel XOP testing. A stack overflow in
Unixext.fold_lines can cause fe to deadlock with a child process, as
fe will then waitpid the child process while the child is still blocked
on writing to stdout.

Signed-off-by: John Else <john.else@citrix.com>
CA-71593: Remove content-disposition from returned http headers.

This will allow browsers to handle the response depending on the
content-type, rather than being forced to download the response as a
file.

Signed-off-by: John Else <john.else@citrix.com>
CA-65777: fe daemon is not shut down cleanly

Signed-off-by: Rok Strnisa <rok.strnisa@citrix.com>
Reduce logging in XML/RPC client

This removes the "Attempting to open..." log lines, which appear
on every XML/RPC call over a Unix domain socket. These lines are not
too useful, and with the gradual introduction of more and more calls
to helper daemons, they are getting too many.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Stringext.String.rtrim "" should not fail, but return ""

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Merge commit 'c8d29886c277f130e966e4c8643de8058d840645'
Merge commit '221017ff6a93668b79be2742bc0fbd227f5c01bc'
Merge commit 'cc0257e816e377ae2b4d8eb574e000aba8be7808'
[http] Http.Url.to_string

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[http] Improve the Http.Url type: it now handles query parameters.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xmlrpc] Remove some spammy debug logging.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenctrlext] Remove bins makefile targets from xenctrlext - it doesn't have any.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Add debug statements to output mscgen commands

We have added debug statements to generate commands for the mscgen program[1],
a graphviz-like tool for generating message sequence diagrams[2]. These
diagrams are useful for analysing interactions between the various xapi
subsystems.

[1] http://www.mcternan.me.uk/mscgen/
[2] http://en.wikipedia.org/wiki/Message_Sequence_Chart

Signed-off-by: Mike McClurg <mike.mcclurg@citrix.com>
Make the rpc annotation strings optional.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Add an NBD client library

This adds a dependency on bitstring.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
[logging]: always log via syslog, not via files and strings

The log and logs modules are nolonger needed: debug can be used everywhere.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenstoreext] Add a xenstoreext library, containing the higher-level watch functions

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[xenstoreext] Add a unit test for the xenstore watch code

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
[logging] Add the ability to echo all log messages to stdout for debugging

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Update the IDL generator to handle exceptions.

Define your exceptions at the top level in your idl file, then raise
them in the server and they'll be reraised in the client. See 'testidl.ml'
and 'testidl_test.ml' in the examples directory for usage.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>