Big fix.
This commit is contained in:
parent
675a0cc5ec
commit
908f9865bc
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) || (diff >/*=*/0 && !ascending))
|
||||
{
|
||||
if(curr == list->head){
|
||||
tsk_list_push_front_item(list, item);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -39,16 +39,6 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
/**@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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -389,10 +389,6 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -106,10 +106,10 @@
|
|||
</div>
|
||||
|
||||
<!-- Alexa -->
|
||||
<div>
|
||||
<!--div>
|
||||
<br />
|
||||
<a href="http://www.alexa.com/siteinfo/www.doubango.org"><script type='text/javascript' language='JavaScript' src='http://xslt.alexa.com/site_stats/js/t/a?url=www.doubango.org'></script></a>
|
||||
</div>
|
||||
</div-->
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue