Changeset 66881597a764d99057ca0b381ab4d311d86dec79
- Timestamp:
- 09/11/09 15:05:37
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1252681537 +0000
- git-parent:
[7e47bd8ddd24e8c8c76a3f1a7ae94710d5bc4664]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1252681537 +0000
- Message:
remove some debugging, register with the eventer for sane output in the capability set, refs #171
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rea6ba41 |
r6688159 |
|
| 101 | 101 | /* Create an XML Document */ |
|---|
| 102 | 102 | xmldoc = xmlNewDoc((xmlChar *)"1.0"); |
|---|
| 103 | | root = xmlNewDocNode(xmldoc, NULL, (xmlChar *)"noitd_capabilities", NULL); |
|---|
| | 103 | root = xmlNewDocNode(xmldoc, NULL, (xmlChar *)"noit_capabilities", NULL); |
|---|
| 104 | 104 | xmlDocSetRootElement(xmldoc, root); |
|---|
| 105 | 105 | |
|---|
| … | … | |
| 112 | 112 | while(noit_hash_next(lc, &iter, &k, &klen, &data)) { |
|---|
| 113 | 113 | xmlNodePtr cnode; |
|---|
| 114 | | char hexcode[10]; |
|---|
| | 114 | char hexcode[11]; |
|---|
| 115 | 115 | const char *name; |
|---|
| 116 | 116 | eventer_func_t *f = (eventer_func_t *)k; |
|---|
| r88a7178 |
r6688159 |
|
| 37 | 37 | #include "eventer/eventer.h" |
|---|
| 38 | 38 | |
|---|
| 39 | | #define NOIT_CAPABILITIES_SERVICE 0xca4aca4a |
|---|
| | 39 | #define NOIT_CAPABILITIES_SERVICE 0x43415041 |
|---|
| 40 | 40 | |
|---|
| 41 | 41 | API_EXPORT(void) |
|---|
| r7e47bd8 |
r6688159 |
|
| 226 | 226 | struct bchain *b; |
|---|
| 227 | 227 | |
|---|
| 228 | | if(req->first_input && req->first_input->size) { |
|---|
| 229 | | noitL(noit_error, "HTTP REQ (headers): ===>%.*s<===\n", |
|---|
| 230 | | req->first_input->size, req->first_input->buff + req->first_input->start); |
|---|
| 231 | | } |
|---|
| 232 | 228 | if(req->state != NOIT_HTTP_REQ_HEADERS) return noit_false; |
|---|
| 233 | 229 | if(!req->current_input) req->current_input = req->first_input; |
|---|
| … | … | |
| 443 | 439 | in->allocd - in->size - in->start, |
|---|
| 444 | 440 | &mask, ctx->conn.e); |
|---|
| 445 | | noitL(noit_error, "HTTP REQ (drive read %d)\n", len); |
|---|
| 446 | 441 | if(len == -1 && errno == EAGAIN) return mask; |
|---|
| 447 | 442 | if(len <= 0) goto full_error; |
|---|
| … | … | |
| 519 | 514 | bytes_read += partial_len; |
|---|
| 520 | 515 | if(buf) memcpy(buf+bytes_read, in->buff+in->start, partial_len); |
|---|
| 521 | | noitL(noit_error, "HTTP REQ (consume) : ===>%.*s<===\n", |
|---|
| 522 | | partial_len, in->buff+in->start); |
|---|
| 523 | 516 | ctx->req.content_length_read += partial_len; |
|---|
| 524 | 517 | in->start += partial_len; |
|---|
| … | … | |
| 550 | 543 | in->allocd - in->size - in->start, |
|---|
| 551 | 544 | mask, ctx->conn.e); |
|---|
| 552 | | noitL(noit_error, "HTTP REQ (consume read %d)\n", rlen); |
|---|
| 553 | 545 | if(rlen == -1 && errno == EAGAIN) { |
|---|
| 554 | 546 | /* We'd block to read more, but we have data, |
|---|
| r7e47bd8 |
r6688159 |
|
| 102 | 102 | |
|---|
| 103 | 103 | void noit_http_rest_init() { |
|---|
| | 104 | eventer_name_callback("http_rest_api/1.0", noit_http_rest_handler); |
|---|
| 104 | 105 | noit_control_dispatch_delegate(noit_control_dispatch, |
|---|
| 105 | 106 | NOIT_CONTROL_GET, |
|---|