|
From: <xf...@us...> - 2013-01-24 20:57:08
|
Revision: 1536
http://scstudio.svn.sourceforge.net/scstudio/?rev=1536&view=rev
Author: xfarmad
Date: 2013-01-24 20:56:57 +0000 (Thu, 24 Jan 2013)
Log Message:
-----------
PCAP VISUAL STUDIO 2008 FIX
Modified Paths:
--------------
trunk/src/data/pcap/application_layer.h
trunk/src/data/pcap/pcap_settings.cpp
trunk/third-party-sw/http_parser/http_parser.c
trunk/third-party-sw/http_parser/http_parser.h
trunk/third-party-sw/win_pcap/bittypes.h
Modified: trunk/src/data/pcap/application_layer.h
===================================================================
--- trunk/src/data/pcap/application_layer.h 2013-01-24 20:50:59 UTC (rev 1535)
+++ trunk/src/data/pcap/application_layer.h 2013-01-24 20:56:57 UTC (rev 1536)
@@ -104,9 +104,9 @@
};
struct HttpHeader {
- size_t field_len;
+ http_size_t field_len;
std::string field; // I don't have use realloc and malloc, as in case of char*
- size_t value_len;
+ http_size_t value_len;
std::string value;
};
@@ -194,13 +194,13 @@
HttpMessagePtr get_http_message();
//callbacks for parser
- static int header_field_cb(http_parser* parser, const char *field, size_t len);
- static int header_value_cb(http_parser* parser, const char *value, size_t len);
- static int request_uri_cb(http_parser* parser, const char *url, size_t len);
+ static int header_field_cb(http_parser* parser, const char *field, http_size_t len);
+ static int header_value_cb(http_parser* parser, const char *value, http_size_t len);
+ static int request_uri_cb(http_parser* parser, const char *url, http_size_t len);
static int headers_complete_cb (http_parser* parser);
static int message_complete_cb (http_parser* parser);
static int message_begin_cb (http_parser* parser);
- static int body_cb (http_parser* parser, const char *body, size_t len);
+ static int body_cb (http_parser* parser, const char *body, http_size_t len);
void static clean_static_data();
};
Modified: trunk/src/data/pcap/pcap_settings.cpp
===================================================================
--- trunk/src/data/pcap/pcap_settings.cpp 2013-01-24 20:50:59 UTC (rev 1535)
+++ trunk/src/data/pcap/pcap_settings.cpp 2013-01-24 20:56:57 UTC (rev 1536)
@@ -172,7 +172,7 @@
if(get_config_long(L"Pcap", L"AggPorts", 0) != 0)
flow_settings->level = PORT_FLOW;
- flow_settings->show_data_size = get_config_long(L"Pcap", L"AggDataSize", 0);
+ flow_settings->show_data_size = (get_config_long(L"Pcap", L"AggDataSize", 0) != 0);
//FlowLevel
if(get_config_long(L"Pcap", L"LstPackets", 1) != 0)
Modified: trunk/third-party-sw/http_parser/http_parser.c
===================================================================
--- trunk/third-party-sw/http_parser/http_parser.c 2013-01-24 20:50:59 UTC (rev 1535)
+++ trunk/third-party-sw/http_parser/http_parser.c 2013-01-24 20:56:57 UTC (rev 1536)
@@ -185,7 +185,7 @@
'x', 'y', 'z', 0, '|', 0, '~', 0 };
-static const int8_t unhex[256] =
+static const http_int8_t unhex[256] =
{-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
@@ -583,7 +583,7 @@
size_t len)
{
char c, ch;
- int8_t unhex_val;
+ http_int8_t unhex_val;
const char *p = data;
const char *header_field_mark = 0;
const char *header_value_mark = 0;
Modified: trunk/third-party-sw/http_parser/http_parser.h
===================================================================
--- trunk/third-party-sw/http_parser/http_parser.h 2013-01-24 20:50:59 UTC (rev 1535)
+++ trunk/third-party-sw/http_parser/http_parser.h 2013-01-24 20:56:57 UTC (rev 1536)
@@ -30,7 +30,7 @@
#include <sys/types.h>
#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)
#include <BaseTsd.h>
-typedef __int8 int8_t;
+typedef __int8 http_int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
Modified: trunk/third-party-sw/win_pcap/bittypes.h
===================================================================
--- trunk/third-party-sw/win_pcap/bittypes.h 2013-01-24 20:50:59 UTC (rev 1535)
+++ trunk/third-party-sw/win_pcap/bittypes.h 2013-01-24 20:56:57 UTC (rev 1536)
@@ -32,8 +32,8 @@
#ifndef HAVE_U_INT8_T
#if SIZEOF_CHAR == 1
-typedef unsigned char u_int8_t;
-typedef signed char int8_t;
+typedef unsigned char http_u_int8_t;
+typedef signed char byttypes_int8_t;
#elif SIZEOF_INT == 1
typedef unsigned int u_int8_t;
typedef signed int int8_t;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|