Index: ChangeLog
===================================================================
--- ChangeLog	(revision 944)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2007-10-28  Rob Bradford  <rob@robster.org.uk>
+
+	* libsoup/soup-session-async.c: (idle_run_queue):
+	Remove the weak pointer in the case where the final reference is not
+	held in run_queue idle callback. This is necessary to avoid stack
+	corruption when the object is eventually disposed.
+
 2007-10-15  Dan Winship  <danw@gnome.org>
 
 	* configure.in: 2.2.102
Index: gtk-doc.make
===================================================================
--- gtk-doc.make	(revision 944)
+++ gtk-doc.make	(working copy)
@@ -38,8 +38,13 @@
 	$(DOC_MODULE).prerequisites \
 	$(DOC_MODULE).signals
 
-CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
+REPORT_FILES = \
+	$(DOC_MODULE)-undocumented.txt \
+	$(DOC_MODULE)-undeclared.txt \
+	$(DOC_MODULE)-unused.txt
 
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
 if ENABLE_GTK_DOC
 all-local: html-build.stamp
 else
@@ -79,6 +84,10 @@
 tmpl.stamp: tmpl-build.stamp
 	@true
 
+tmpl/*.sgml:
+	@true
+
+
 #### xml ####
 
 sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
@@ -96,11 +105,11 @@
 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
 	@echo 'gtk-doc: Building HTML'
 	@-chmod -R u+w $(srcdir)
-	rm -rf $(srcdir)/html 
+	rm -rf $(srcdir)/html
 	mkdir $(srcdir)/html
 	cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
 	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
-	@echo 'gtk-doc: Fixing cross-references' 
+	@echo 'gtk-doc: Fixing cross-references'
 	cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
 	touch html-build.stamp
 
@@ -110,8 +119,13 @@
 	rm -f *~ *.bak
 	rm -rf .libs
 
+distclean-local:
+	cd $(srcdir) && \
+	  rm -rf xml $(REPORT_FILES) \
+	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
 maintainer-clean-local: clean
-	cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+	cd $(srcdir) && rm -rf xml html
 
 install-data-local:
 	installfiles=`echo $(srcdir)/html/*`; \
@@ -125,7 +139,11 @@
 	  done; \
 	  echo '-- Installing $(srcdir)/html/index.sgml' ; \
 	  $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+	  if test `which gtkdoc-rebase` != ""; then \
+        gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \
+	  fi \
 	fi
+	
 
 uninstall-local:
 	rm -f $(DESTDIR)$(TARGET_DIR)/*
@@ -148,8 +166,9 @@
 	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
 	-cp $(srcdir)/xml/*.xml $(distdir)/xml
 	cp $(srcdir)/html/* $(distdir)/html
-	if test -f $(srcdir)/$(DOC_MODULE).types; then \
-	  cp $(srcdir)/$(DOC_MODULE).types $(distdir)/$(DOC_MODULE).types; \
-	fi
+	cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+	cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+	cd $(distdir) && rm -f $(DISTCLEANFILES)
+	-gtkdoc-rebase --online --relative --html-dir=$(distdir)/html
 
 .PHONY : dist-hook-local docs
Index: libsoup/soup-session-async.c
===================================================================
--- libsoup/soup-session-async.c	(revision 944)
+++ libsoup/soup-session-async.c	(working copy)
@@ -193,7 +193,10 @@
 	g_object_unref (sa);
 
 	if (sa)
+	{
+		g_object_remove_weak_pointer (G_OBJECT (sa), (gpointer)&sa);
 		run_queue (sa, TRUE);
+	}
 	return FALSE;
 }
 
