Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix missing cast nit
  • Loading branch information
GlenTiki committed Feb 7, 2015
commit fde51f1ff5ab1e60ae438c402176fe34cbae59ac
2 changes: 1 addition & 1 deletion src/node_lttng.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void LTTNG_HTTP_SERVER_REQUEST(const FunctionCallbackInfo<Value>& args) {
req.forwarded_for = *fwdfor;

if (!strfwdfor->IsString() || req.forwarded_for == nullptr)
req.forwarded_for = const_cast<char*>("");
req.forwarded_for = "";

SLURP_CONNECTION(args[1], conn);
NODE_HTTP_SERVER_REQUEST(&req, &conn, conn.remote, conn.port, req.method, \
Expand Down
12 changes: 6 additions & 6 deletions src/node_lttng.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ extern "C" {
typedef struct {
int32_t fd;
int32_t port;
char* remote;
const char* remote;
int32_t buffered;
} node_lttng_connection_t;

typedef struct {
char* url;
char* method;
const char* url;
const char* method;
} node_lttng_http_client_request_t;

typedef struct {
union {
uint32_t version;
uintptr_t unused; /* for compat. with old 64-bit struct */
} _un;
char* url;
char* method;
const char* url;
const char* method;
const char* forwarded_for;
char* _pad[8];
const char* _pad[8];
} node_lttng_http_server_request_t;

} // extern "C"
Expand Down
16 changes: 8 additions & 8 deletions src/node_lttng_tp.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ TRACEPOINT_EVENT(
node,
http_server_request,
TP_ARGS(
char*, url,
char*, method,
const char*, url,
const char*, method,
const char*, forwardedFor
),
TP_FIELDS(
Expand All @@ -29,7 +29,7 @@ TRACEPOINT_EVENT(
http_server_response,
TP_ARGS(
int, port,
char*, remote,
const char*, remote,
int, fd
),
TP_FIELDS(
Expand All @@ -43,8 +43,8 @@ TRACEPOINT_EVENT(
node,
http_client_request,
TP_ARGS(
char*, url,
char*, method
const char*, url,
const char*, method
),
TP_FIELDS(
ctf_string(url, url)
Expand All @@ -57,7 +57,7 @@ TRACEPOINT_EVENT(
http_client_response,
TP_ARGS(
int, port,
char*, remote,
const char*, remote,
int, fd
),
TP_FIELDS(
Expand All @@ -71,7 +71,7 @@ TRACEPOINT_EVENT(
node,
net_server_connection,
TP_ARGS(
char*, remote,
const char*, remote,
int, port,
int, fd,
int, buffered
Expand All @@ -88,7 +88,7 @@ TRACEPOINT_EVENT(
node,
net_stream_end,
TP_ARGS(
char*, remote,
const char*, remote,
int, port,
int, fd
),
Expand Down