diff --git a/trunk/tinyHTTP/include/tinyHTTP/headers/thttp_header_Content_Type.h b/trunk/tinyHTTP/include/tinyHTTP/headers/thttp_header_Content_Type.h index 2be85ab9..61fee8c2 100644 --- a/trunk/tinyHTTP/include/tinyHTTP/headers/thttp_header_Content_Type.h +++ b/trunk/tinyHTTP/include/tinyHTTP/headers/thttp_header_Content_Type.h @@ -51,7 +51,7 @@ THTTP_BEGIN_DECLS /// @date 12/3/2009 /// /// @par ABNF= Content-Type -/// Content-Type = ( "Content-Type" / "c" ) HCOLON media-type +/// Content-Type = ( "Content-Type" ) HCOLON media-type /// media-type = m-type SLASH m-subtype *( SEMI m-parameter) /// m-type = discrete-type / composite-type /// discrete-type = "text" / "image" / "audio" / "video" / "application" / extension-token diff --git a/trunk/tinyHTTP/ragel/thttp_parser_header_Content_Type.rl b/trunk/tinyHTTP/ragel/thttp_parser_header_Content_Type.rl index 23ad2b8e..6146d1f1 100644 --- a/trunk/tinyHTTP/ragel/thttp_parser_header_Content_Type.rl +++ b/trunk/tinyHTTP/ragel/thttp_parser_header_Content_Type.rl @@ -78,7 +78,7 @@ media_type = (m_type SLASH m_subtype)@1 >tag %parse_content_type ((SEMI m_parameter)*)@0; - Content_Type = ( "Content-Type"i | "c"i ) HCOLON media_type; + Content_Type = ( "Content-Type"i ) HCOLON media_type; # Entry point main := Content_Type :>CRLF @eob; diff --git a/trunk/tinySAK/src/tsk_list.c b/trunk/tinySAK/src/tsk_list.c index 32189cdd..8fdc1957 100644 --- a/trunk/tinySAK/src/tsk_list.c +++ b/trunk/tinySAK/src/tsk_list.c @@ -269,7 +269,7 @@ void tsk_list_push_filtered_item(tsk_list_t* list, tsk_list_item_t** item, int a while(curr) { int diff = tsk_object_cmp((*item), curr); - if((diff <= 0 && ascending) || (diff >=0 && !ascending)) + if((diff /*=*/0 && !ascending)) { if(curr == list->head){ tsk_list_push_front_item(list, item); diff --git a/trunk/tinySAK/src/tsk_params.c b/trunk/tinySAK/src/tsk_params.c index 9528a8bc..35b9b618 100644 --- a/trunk/tinySAK/src/tsk_params.c +++ b/trunk/tinySAK/src/tsk_params.c @@ -224,7 +224,7 @@ int tsk_params_tostring(const tsk_params_L_t *self, const char separator, tsk_bu { tsk_param_t* param = item->data; //tsk_params_param_tostring(param, output); - if(item == self->head) + if(TSK_LIST_IS_FIRST(self, item)) { if(ret = tsk_buffer_appendEx(output, param->value?"%s=%s":"%s", param->name, param->value)){ goto bail; diff --git a/trunk/tinySAK/src/tsk_params.h b/trunk/tinySAK/src/tsk_params.h index 60157895..80e64b3d 100644 --- a/trunk/tinySAK/src/tsk_params.h +++ b/trunk/tinySAK/src/tsk_params.h @@ -48,6 +48,8 @@ TSK_BEGIN_DECLS #define TSK_PARAM_CREATE(name, value) tsk_object_new(tsk_param_def_t, (const char*)name, (const char*)value) #define TSK_PARAM_CREATE_NULL() TSK_PARAM_CREATE(TSK_NULL, TSK_NULL) +#define TSK_PARAM(self) ((tsk_param_t*)(self)) + /**@ingroup tsk_params_group * Parameter. */ diff --git a/trunk/tinySIP/include/tinysip/tsip_message.h b/trunk/tinySIP/include/tinysip/tsip_message.h index 795e4b10..f5a8f818 100644 --- a/trunk/tinySIP/include/tinysip/tsip_message.h +++ b/trunk/tinySIP/include/tinysip/tsip_message.h @@ -79,7 +79,7 @@ TSIP_BEGIN_DECLS #define TSIP_REQUEST_METHOD(self) ((self)->method) #define TSIP_REQUEST_URI(self) ((self)->uri) -#define TSIP_MESSAGE_HAS_CONTENT(message) ((message) && (message)->Content) +#define TSIP_MESSAGE_HAS_CONTENT(message) ((message) && (message)->Content && (message)->Content->data) #define TSIP_MESSAGE_CONTENT_LENGTH(message) (uint32_t)(((message) && (message)->Content_Length) ? (message)->Content_Length->length : 0) #define TSIP_MESSAGE_CONTENT(message) (TSIP_MESSAGE_HAS_CONTENT(message) ? (message)->Content->data : 0) diff --git a/trunk/tinySIP/include/tinysip/tsip_uri.h b/trunk/tinySIP/include/tinysip/tsip_uri.h index 5a4bd6f2..0171aefb 100644 --- a/trunk/tinySIP/include/tinysip/tsip_uri.h +++ b/trunk/tinySIP/include/tinysip/tsip_uri.h @@ -69,8 +69,6 @@ tsip_host_type_t; /// /// @brief SIP/SIPS/TEL URI. /// -/// @author Mamadou -/// @date 12/6/2009 //////////////////////////////////////////////////////////////////////////////////////////////////// typedef struct tsip_uri_s { @@ -85,7 +83,7 @@ typedef struct tsip_uri_s char *password; char *display_name; - tsk_params_L_t *params; /**< list of tsk_param_t elements containing all parameters. */ + tsk_params_L_t *params; /**< list of @ref tsk_param_t elements containing all parameters. */ } tsip_uri_t; diff --git a/trunk/tinySIP/ragel/tsip_parser_uri.rl b/trunk/tinySIP/ragel/tsip_parser_uri.rl index f92a66fa..0d0466d0 100644 --- a/trunk/tinySIP/ragel/tsip_parser_uri.rl +++ b/trunk/tinySIP/ragel/tsip_parser_uri.rl @@ -57,9 +57,9 @@ action is_tel { uri->scheme = tsk_strdup("tel"), uri->type = uri_tel; } #/* Sets HOST type */ - action is_ipv4 { uri->host_type = uri->host_type = host_ipv4; } - action is_ipv6 { uri->host_type = uri->host_type = host_ipv6; } - action is_hostname { uri->host_type = uri->host_type = host_hostname; } + action is_ipv4 { uri->host_type = host_ipv4; } + action is_ipv6 { uri->host_type = host_ipv6; } + action is_hostname { uri->host_type = host_hostname; } action parse_scheme { diff --git a/trunk/tinySIP/src/headers/tsip_header_WWW_Authenticate.c b/trunk/tinySIP/src/headers/tsip_header_WWW_Authenticate.c index 631f1c42..ee5cf72e 100644 --- a/trunk/tinySIP/src/headers/tsip_header_WWW_Authenticate.c +++ b/trunk/tinySIP/src/headers/tsip_header_WWW_Authenticate.c @@ -39,16 +39,6 @@ #include -/**@defgroup tsip_header_WWW_Authenticate_group SIP WWW-Authenticate header. -*/ - -/*********************************** -* Ragel state machine. -*/ - -/* #line 131 "tsip_parser_header_WWW_Authenticate.rl" */ - - int tsip_header_WWW_Authenticate_tostring(const void* header, tsk_buffer_t* output) { if(header) @@ -124,8 +114,6 @@ tsip_header_WWW_Authenticate_t *tsip_header_WWW_Authenticate_parse(const char *d // WWW_Authenticate header object definition // -/**@ingroup tsip_header_WWW_Authenticate_group -*/ static void* tsip_header_WWW_Authenticate_create(void *self, va_list * app) { tsip_header_WWW_Authenticate_t *WWW_Authenticate = self; @@ -141,8 +129,6 @@ static void* tsip_header_WWW_Authenticate_create(void *self, va_list * app) return self; } -/**@ingroup tsip_header_WWW_Authenticate_group -*/ static void* tsip_header_WWW_Authenticate_destroy(void *self) { tsip_header_WWW_Authenticate_t *WWW_Authenticate = self; diff --git a/trunk/tinySIP/src/tsip_message.c b/trunk/tinySIP/src/tsip_message.c index 411dda82..bbd45b06 100644 --- a/trunk/tinySIP/src/tsip_message.c +++ b/trunk/tinySIP/src/tsip_message.c @@ -111,10 +111,8 @@ int tsip_message_add_header(tsip_message_t *self, const tsip_header_t *hdr) int tsip_message_add_headers(tsip_message_t *self, const tsip_headers_L_t *headers) { tsk_list_item_t *item = 0; - if(self) - { - tsk_list_foreach(item, headers) - { + if(self){ + tsk_list_foreach(item, headers){ tsip_message_add_header(self, item->data); } return 0; diff --git a/trunk/tinySIP/src/tsip_uri.c b/trunk/tinySIP/src/tsip_uri.c index 50c613c5..21dba282 100644 --- a/trunk/tinySIP/src/tsip_uri.c +++ b/trunk/tinySIP/src/tsip_uri.c @@ -217,7 +217,7 @@ int tsip_uri_strcmp(const char* s1, const char* s2, int case_sensitive) #define tsip_uri_strequals(s1, s2) !tsip_uri_strcmp(s1, s2, 1) #define tsip_uri_striequals(s1, s2) !tsip_uri_strcmp(s1, s2, 0) -static int tsip_uri_cmp(const void *obj1, const void *obj2) +static int tsip_uri_cmp(const tsk_object_t *obj1, const tsk_object_t *obj2) { if(obj1 && obj2) { diff --git a/trunk/tinySIP/test/test/test.vcproj b/trunk/tinySIP/test/test/test.vcproj index fe516932..8baf156e 100644 --- a/trunk/tinySIP/test/test/test.vcproj +++ b/trunk/tinySIP/test/test/test.vcproj @@ -389,10 +389,6 @@ > - - diff --git a/trunk/tinySIP/test/test/test_uri.h b/trunk/tinySIP/test/test/test_uri.h index 1213771a..66bf7478 100644 --- a/trunk/tinySIP/test/test/test_uri.h +++ b/trunk/tinySIP/test/test/test_uri.h @@ -68,8 +68,6 @@ const char* uris[] = "tel:863-1234;phone-context=+1-914-555", "tel:#666#", }; -#include "tsk_string.h" - void test_uri_tostring(const tsip_uri_t *uri) { char* ret = tsip_uri_tostring(uri, 1, 1); diff --git a/trunk/website/index.html b/trunk/website/index.html index 4ebc2213..99e54eaa 100644 --- a/trunk/website/index.html +++ b/trunk/website/index.html @@ -106,10 +106,10 @@ -
+