diff options
author | snowdrop | 2006-02-08 11:13:13 +0000 |
---|---|---|
committer | snowdrop | 2006-02-08 11:13:13 +0000 |
commit | c4286ea5287279836c5ef49a06153db95429bfe6 (patch) | |
tree | 1ace3f15224374a6350b028b2fe50d34072f5f87 /examples | |
parent | 1340ec27d42648e84878abe2d2f0b6f23ca24d82 (diff) | |
download | csoap-c4286ea5287279836c5ef49a06153db95429bfe6.tar.gz csoap-c4286ea5287279836c5ef49a06153db95429bfe6.tar.bz2 |
the attached patches address the following issues:
* query the port the server is listening on
{soap_server,httpd}_get_port
* the possibility to add a default service via httpd_register_default
* remove some compiler warnings (on FreeBSD pthread_t is a pointer to
a struct pthread, on Linux it is a (unsigned?) long int)
tschuess,
Heiko
Diffstat (limited to 'examples')
-rw-r--r-- | examples/csoap/soapclient.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/csoap/soapclient.c b/examples/csoap/soapclient.c index 7f96364..d40faf8 100644 --- a/examples/csoap/soapclient.c +++ b/examples/csoap/soapclient.c @@ -5,6 +5,7 @@ #include <stdio.h> #include <string.h> +#include <ctype.h> #include <libcsoap/soap-client.h> #define MAX_LINE_LENGTH 65535 @@ -200,7 +201,7 @@ main(int argc, char *argv[]) // create buffer char Buffer[MAX_LINE_LENGTH]; - int bytes_read, bytes_left; + long bytes_read, bytes_left; // read from stdin until EOF while (!feof(stdin)) @@ -209,7 +210,7 @@ main(int argc, char *argv[]) // pass each line into ParseLine char *EndLinePos; - while (EndLinePos = strchr(Buffer, '\n')) + while ((EndLinePos = strchr(Buffer, '\n'))) { ParseLine(ctx, Buffer, EndLinePos - Buffer); memmove(Buffer, EndLinePos + 1, bytes_read - (EndLinePos - Buffer + 1)); @@ -217,7 +218,7 @@ main(int argc, char *argv[]) } // no '\n' found in the whole Buffer, that means line's too - long bytes_left = strlen(Buffer); + bytes_left = strlen(Buffer); if (bytes_left == MAX_LINE_LENGTH) { log_error1("The parameter line is too long."); |