OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu> | 2 * Copyright (c) 2000-2004 Niels Provos <provos@citi.umich.edu> |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #ifndef WIN32 | 48 #ifndef WIN32 |
49 #include <unistd.h> | 49 #include <unistd.h> |
50 #endif | 50 #endif |
51 #include <errno.h> | 51 #include <errno.h> |
52 #include <signal.h> | 52 #include <signal.h> |
53 #include <string.h> | 53 #include <string.h> |
54 #include <assert.h> | 54 #include <assert.h> |
55 | 55 |
56 #include "event.h" | 56 #include "event.h" |
57 #include "evrpc.h" | 57 #include "evrpc.h" |
58 #include "event-internal.h" | |
59 #include "evrpc-internal.h" | 58 #include "evrpc-internal.h" |
60 #include "evhttp.h" | 59 #include "evhttp.h" |
61 #include "evutil.h" | 60 #include "evutil.h" |
62 #include "log.h" | 61 #include "log.h" |
63 | 62 |
64 struct evrpc_base * | 63 struct evrpc_base * |
65 evrpc_init(struct evhttp *http_server) | 64 evrpc_init(struct evhttp *http_server) |
66 { | 65 { |
67 struct evrpc_base* base = calloc(1, sizeof(struct evrpc_base)); | 66 struct evrpc_base* base = calloc(1, sizeof(struct evrpc_base)); |
68 if (base == NULL) | 67 if (base == NULL) |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 | 648 |
650 static void | 649 static void |
651 evrpc_request_timeout(int fd, short what, void *arg) | 650 evrpc_request_timeout(int fd, short what, void *arg) |
652 { | 651 { |
653 struct evrpc_request_wrapper *ctx = arg; | 652 struct evrpc_request_wrapper *ctx = arg; |
654 struct evhttp_connection *evcon = ctx->evcon; | 653 struct evhttp_connection *evcon = ctx->evcon; |
655 assert(evcon != NULL); | 654 assert(evcon != NULL); |
656 | 655 |
657 evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); | 656 evhttp_connection_fail(evcon, EVCON_HTTP_TIMEOUT); |
658 } | 657 } |
OLD | NEW |