git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix misleading comments that improperly refer to vsliver_vs on an lxc node
[nodemanager.git]
/
forward_api_calls.c
diff --git
a/forward_api_calls.c
b/forward_api_calls.c
index
52d7024
..
9e2d2bb
100644
(file)
--- a/
forward_api_calls.c
+++ b/
forward_api_calls.c
@@
-1,4
+1,5
@@
-/* forward_api_calls.c: forward XMLRPC calls to the Node Manager
+/*
+ * forward_api_calls.c: forward XMLRPC calls to the Node Manager
* Used as a shell, this code works in tandem with sshd
* to allow authenticated remote access to a localhost-only service.
*
* Used as a shell, this code works in tandem with sshd
* to allow authenticated remote access to a localhost-only service.
*
@@
-6,12
+7,15
@@
* Doesn't handle Unicode properly. UTF-8 is probably OK.
*
* Change History:
* Doesn't handle Unicode properly. UTF-8 is probably OK.
*
* Change History:
+ * 2007/05/02: [deisenst] Increased buffer space to 1MiB.
+ * Increased TIMEOUT_SECS to 2min.
+ * 2006/10/30: [deisenst] Changed location of Unix socket.
* 2006/09/14: [deisenst] Switched to PF_UNIX sockets so that SO_PEERCRED works
* 2006/09/08: [deisenst] First version.
*/
* 2006/09/14: [deisenst] Switched to PF_UNIX sockets so that SO_PEERCRED works
* 2006/09/08: [deisenst] First version.
*/
-static const int TIMEOUT_SECS =
3
0;
-const char *API_addr = "/tmp/node
_mg
r.api";
+static const int TIMEOUT_SECS =
12
0;
+const char *API_addr = "/tmp/node
manage
r.api";
static const char *Header =
"POST / HTTP/1.0\r\n"
static const char *Header =
"POST / HTTP/1.0\r\n"
@@
-53,8
+57,8
@@
static void ERROR(const char *s) {
int main(int argc, char **argv, char **envp) {
ssize_t len;
int main(int argc, char **argv, char **envp) {
ssize_t len;
- char header_buf[
4096
];
- char content_buf[
4096
];
+ char header_buf[
1<<20
];
+ char content_buf[
1<<20
];
size_t content_len;
int sockfd;
struct sockaddr_un addr;
size_t content_len;
int sockfd;
struct sockaddr_un addr;
@@
-64,6
+68,7
@@
int main(int argc, char **argv, char **envp) {
/* read xmlrpc request from stdin
* 4 KiB ought to be enough for anyone
/* read xmlrpc request from stdin
* 4 KiB ought to be enough for anyone
+ * 2007/05/02: [deisenst] It wasn't.
*/
content_len = 0;
while(content_len < sizeof content_buf) {
*/
content_len = 0;
while(content_len < sizeof content_buf) {