aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-27 19:15:51 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-01-27 19:15:51 +0300
commita450d0faa8851a7df8dbb52788f99fe216f57c3d (patch)
treeed2f45a6fd083e7e3b833bbdd576874d122c5f69 /utils
parentec5b7a84cfd158b8b6b5714b47c48028a9c29a6a (diff)
downloadrspamd-a450d0faa8851a7df8dbb52788f99fe216f57c3d.tar.gz
rspamd-a450d0faa8851a7df8dbb52788f99fe216f57c3d.zip
* Add new hash for storing hash data in shared memory
* Add rwlocks implementation (primitive) in memory pool library
Diffstat (limited to 'utils')
-rw-r--r--utils/url_extracter.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/utils/url_extracter.c b/utils/url_extracter.c
index f92c76381..ede39ec27 100644
--- a/utils/url_extracter.c
+++ b/utils/url_extracter.c
@@ -14,9 +14,17 @@
#include <gmime/gmime.h>
#include "../src/config.h"
+#if !defined(HAVE_OWN_QUEUE_H) && defined(HAVE_SYS_QUEUE_H)
+#include <sys/queue.h>
+#endif
+#ifdef HAVE_OWN_QUEUE_H
+#include "../src/queue.h"
+#endif
+
#include "../src/main.h"
#include "../src/cfg_file.h"
#include "../src/url.h"
+#include "../src/message.h"
static void
mime_foreach_callback (GMimeObject *part, gpointer user_data)
@@ -72,7 +80,7 @@ mime_foreach_callback (GMimeObject *part, gpointer user_data)
mime_part = g_malloc (sizeof (struct mime_part));
mime_part->type = type;
mime_part->content = part_content;
- TAILQ_INSERT_TAIL (&task->parts, mime_part, next);
+ task->parts = g_list_prepend (task->parts, mime_part);
if (g_mime_content_type_is_type (type, "text", "html")) {
printf ("Found text/html part\n");
url_parse_html (task, part_content);
@@ -127,7 +135,6 @@ main (int argc, char **argv)
task.message = message;
TAILQ_INIT (&task.urls);
- TAILQ_INIT (&task.parts);
/* free the parser (and the stream) */
g_object_unref (parser);