Commit d734195d authored by Pekka Pessi's avatar Pekka Pessi

Reordered #includes in http module.

Avoid #include ordering problem with <sofia-sip/http_parser.h>.

darcs-hash:20060511120558-65a35-5ce01fb1ebd68c9ca97e0e0a94f6543e3bca88d2.gz
parent 05e81160
......@@ -37,11 +37,9 @@
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
/* Avoid casting http_t to msg_pub_t and http_header_t to msg_header_t */
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#include <sofia-sip/su_alloc.h>
......@@ -52,6 +50,12 @@
#include <sofia-sip/msg_mime_protos.h>
#include <sofia-sip/msg_date.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <stdio.h>
/* ====================================================================== */
/**@HTTP_HEADER http_request HTTP request line.
......
......@@ -39,6 +39,10 @@
#include <limits.h>
#include <assert.h>
/* Avoid casting http_t to msg_pub_t and http_header_t to msg_header_t */
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#include "sofia-sip/http_parser.h"
/* ========================================================================== */
......
......@@ -44,6 +44,9 @@
#include <sofia-sip/su_alloc.h>
/* Avoid casting http_t to msg_pub_t and http_header_t to msg_header_t */
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#define HTTP_STATIC_INLINE
#include "sofia-sip/http_parser.h"
......
......@@ -33,24 +33,27 @@
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
#include <sofia-sip/su_tagarg.h>
/* Avoid casting http_t to msg_pub_t and http_header_t to msg_header_t */
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#include <sofia-sip/su_alloc.h>
#include "sofia-sip/http_parser.h"
#include <sofia-sip/msg_parser.h>
#include <sofia-sip/http_header.h>
#include <sofia-sip/http_status.h>
#include <sofia-sip/msg_mclass.h>
#include <sofia-sip/su_tagarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <limits.h>
#include <stdarg.h>
/** HTTP version 1.1. */
char const http_version_1_1[] = "HTTP/1.1";
/** HTTP version 1.0. */
......
......@@ -46,6 +46,10 @@
#include <stddef.h>
#include <string.h>
/* Avoid casting http_t to msg_pub_t and http_header_t to msg_header_t */
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#include <sofia-sip/http_parser.h>
#include <sofia-sip/msg_mclass.h>
......
......@@ -37,6 +37,10 @@
#include <sofia-sip/su.h>
/* Avoid casting http_t to msg_pub_t and http_header_t to msg_header_t */
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#include <sofia-sip/http_parser.h>
#include <sofia-sip/http_tag.h>
......@@ -111,7 +115,7 @@ tagi_t *httptag_filter(tagi_t *dst,
http = (http_t const *)src->t_value;
mc = (void *)http->http_common->h_class;
hh = (void *)msg_hclass_offset(mc, (http_t *)http, hc);
hh = (void *)msg_hclass_offset(mc, http, hc);
if (http == NULL ||
hh >= (http_header_t const **)((char *)http + http->http_size) ||
......
......@@ -37,11 +37,7 @@
#endif
#ifndef MSG_H
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#include <sofia-sip/msg.h>
#else
#error "<http_parser.h> must be included before <msg.h>"
#endif
#ifndef MSG_PARSER_H
......
......@@ -33,6 +33,10 @@
#include "config.h"
/* Avoid casting http_t to msg_pub_t and http_header_t to msg_header_t */
#define MSG_PUB_T struct http_s
#define MSG_HDR_T union http_header_u
#include <stdio.h>
#include <string.h>
#include <stddef.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment