Permalink
Browse files

example_servers: Update to memory manager.

  • Loading branch information...
1 parent 65a4cdd commit ffeecf74e8a3c57e9c332cf0bfd7da7b9d42e597 Christopher Alfeld committed Feb 26, 2014
Showing with 14 additions and 14 deletions.
  1. +9 −9 example_servers/parsed_c.c
  2. +5 −5 example_servers/unparsed_cpp.cpp
View
@@ -231,15 +231,15 @@ ib_status_t send_to_ironbee(
*
* @param[out] headers Constructed headers list.
* @param[in] src Headers to construct from.
- * @param[in] mp Memory pool to use.
+ * @param[in] mm Memory manager to use.
* @return
* - IB_OK on success.
* - Error code on any failure.
**/
ib_status_t convert_headers(
ib_parsed_headers_t **headers,
const header_t *src,
- ib_mpool_t *mp
+ ib_mm_t mm
);
/* Server Callbacks
@@ -522,7 +522,7 @@ ib_status_t send_to_ironbee(
* The tx object holds all per-transaction information. Besides using it
* to indicate which transaction we are providing data for, it will allow
* us to control the lifetime of all our created objects. We do this by
- * allocating all memory from `tx->mp`, a memory pool whose lifetime is
+ * allocating all memory from `tx->mm`, a memory manager whose lifetime is
* equal to that of the transaction.
*/
rc = ib_tx_create(&tx, conn, NULL);
@@ -551,7 +551,7 @@ ib_status_t send_to_ironbee(
ib_parsed_req_line_t *req_line;
rc = ib_parsed_req_line_create(
- &req_line, tx->mp,
+ &req_line, tx->mm,
IB_S2SL(request->line.raw),
IB_S2SL(request->line.method),
IB_S2SL(request->line.uri),
@@ -575,7 +575,7 @@ ib_status_t send_to_ironbee(
{
ib_parsed_headers_t *headers;
- rc = convert_headers(&headers, request->headers, tx->mp);
+ rc = convert_headers(&headers, request->headers, tx->mm);
if (rc != IB_OK) {
ib_log_error(engine, "Error converting request headers: %s",
ib_status_to_string(rc));
@@ -623,7 +623,7 @@ ib_status_t send_to_ironbee(
ib_parsed_resp_line_t *resp_line;
rc = ib_parsed_resp_line_create(
- &resp_line, tx->mp,
+ &resp_line, tx->mm,
IB_S2SL(response->line.raw),
IB_S2SL(response->line.protocol),
IB_S2SL(response->line.status),
@@ -647,7 +647,7 @@ ib_status_t send_to_ironbee(
{
ib_parsed_headers_t *headers;
- rc = convert_headers(&headers, response->headers, tx->mp);
+ rc = convert_headers(&headers, response->headers, tx->mm);
if (rc != IB_OK) {
ib_log_error(engine, "Error converting response headers: %s",
ib_status_to_string(rc));
@@ -710,13 +710,13 @@ ib_status_t send_to_ironbee(
ib_status_t convert_headers(
ib_parsed_headers_t **headers,
const header_t *src,
- ib_mpool_t *mp
+ ib_mm_t mm
)
{
ib_parsed_headers_t *local_headers;
ib_status_t rc;
- rc = ib_parsed_headers_create(&local_headers, mp);
+ rc = ib_parsed_headers_create(&local_headers, mm);
if (rc != IB_OK) {
return rc;
}
@@ -492,7 +492,7 @@ void ExampleIronBee::send_to_ironbee(
* The transaction object holds all per-transaction information. Besides
* using it to indicate which transaction we are providing data for, it
* will allow us to control the lifetime of all our created objects. We
- * do this by allocating all memory from `transaction.memory_pool()`, a
+ * do this by allocating all memory from `transaction.memory_manager()`, a
* memory pool whose lifetime is equal to that of the transaction.
*/
IronBee::Transaction transaction =
@@ -516,7 +516,7 @@ void ExampleIronBee::send_to_ironbee(
{
IronBee::ParsedRequestLine request_line =
IronBee::ParsedRequestLine::create_alias(
- transaction.memory_pool(),
+ transaction.memory_manager(),
request.raw_request_line.begin(),
request.raw_request_line.size(),
request.request_line.method.begin(),
@@ -533,7 +533,7 @@ void ExampleIronBee::send_to_ironbee(
{
IronBee::psheader_to_parsed_header_const_range_t headers =
IronBee::psheaders_to_parsed_headers(
- transaction.memory_pool(),
+ transaction.memory_manager(),
request.headers.headers
);
@@ -560,7 +560,7 @@ void ExampleIronBee::send_to_ironbee(
{
IronBee::ParsedResponseLine response_line =
IronBee::ParsedResponseLine::create_alias(
- transaction.memory_pool(),
+ transaction.memory_manager(),
response.raw_response_line.begin(),
response.raw_response_line.size(),
response.response_line.version.begin(),
@@ -577,7 +577,7 @@ void ExampleIronBee::send_to_ironbee(
{
IronBee::psheader_to_parsed_header_const_range_t headers =
IronBee::psheaders_to_parsed_headers(
- transaction.memory_pool(),
+ transaction.memory_manager(),
response.headers.headers
);
m_engine.notify().response_header_data(

0 comments on commit ffeecf7

Please sign in to comment.