Commit 80d803ba authored by Lucian Langa's avatar Lucian Langa
Browse files

fix for debian bug - #528827

parent 9a5a5a8f
2009-05-16 Lucian Langa <lucilanga@gnome.org>
* src/parser.c (layer_find_all): fix for Debian Bug #528827
2009-05-15 Lucian Langa <lucilanga@gnome.org>
* src/org-gnome-evolution-rss.eplug.xml:
......
......@@ -74,6 +74,7 @@ SOURCES = dbus.c \
file-gio.c \
misc.c \
network-soup.c \
parser.c \
rss.c \
rss-config-factory.c \
rss-icon-factory.c
......
......@@ -64,11 +64,11 @@ pluginLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(plugin_LTLIBRARIES)
liborg_gnome_evolution_rss_la_LIBADD =
am__liborg_gnome_evolution_rss_la_SOURCES_DIST = dbus.c fetch.c \
file-gio.c misc.c network-soup.c rss.c rss-config-factory.c \
rss-icon-factory.c gecko-utils.cpp
file-gio.c misc.c network-soup.c parser.c rss.c \
rss-config-factory.c rss-icon-factory.c gecko-utils.cpp
@HAVE_GECKO_TRUE@am__objects_1 = gecko-utils.lo
am__objects_2 = dbus.lo fetch.lo file-gio.lo misc.lo network-soup.lo \
rss.lo rss-config-factory.lo rss-icon-factory.lo \
parser.lo rss.lo rss-config-factory.lo rss-icon-factory.lo \
$(am__objects_1)
am_liborg_gnome_evolution_rss_la_OBJECTS = $(am__objects_2)
liborg_gnome_evolution_rss_la_OBJECTS = \
......@@ -350,8 +350,8 @@ plugin_DATA = org-gnome-evolution-rss.eplug \
org-gnome-evolution-rss.xml
plugin_LTLIBRARIES = liborg-gnome-evolution-rss.la
SOURCES = dbus.c fetch.c file-gio.c misc.c network-soup.c rss.c \
rss-config-factory.c rss-icon-factory.c $(am__append_2)
SOURCES = dbus.c fetch.c file-gio.c misc.c network-soup.c parser.c \
rss.c rss-config-factory.c rss-icon-factory.c $(am__append_2)
liborg_gnome_evolution_rss_la_SOURCES = $(SOURCES)
liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(WEBKIT_LIBS) $(GECKO_LIBS) $(LIBSOUP_LIBS) $(NO_UNDEFINED_LIBS) $(NO_UNDEFINED)
#$(GECKO_RPATH)
......@@ -510,6 +510,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gecko-utils.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/network-soup.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rss-config-factory.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rss-icon-factory.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rss.Plo@am__quote@
......
......@@ -21,6 +21,8 @@
#ifndef _FETCH_H_
#define _FETCH_H_ 1
#include "network.h"
GString *fetch_blocking(gchar *url, GSList *headers, GString *post,
NetStatusCallback cb, gpointer data,
GError **err);
......
......@@ -236,7 +236,6 @@ proxify_session(EProxy *proxy, SoupSession *session, gchar *uri)
/*avail only for > 2.26*/
case 0:
if (rss_soup_jar)
soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_GNOME);
break;
}
......@@ -505,7 +504,8 @@ net_get_unblocking(gchar *url,
// soup_session_async_new_with_options(SOUP_SESSION_TIMEOUT, SS_TIMEOUT, NULL);
soup_session_async_new();
soup_session_add_feature(soup_sess, SOUP_SESSION_FEATURE(rss_soup_jar));
if (rss_soup_jar)
soup_session_add_feature(soup_sess, SOUP_SESSION_FEATURE(rss_soup_jar));
proxify_session(proxy, soup_sess, url);
if (cb && data) {
info = g_new0(CallbackInfo, 1);
......
......@@ -16,8 +16,21 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <string.h>
#include <glib/gi18n.h>
#include <libxml/parserInternals.h>
#include <libxml/xmlmemory.h>
#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
#include <libxml/debugXML.h>
#include "fetch.h"
#include "rss.h"
#include "parser.h"
#include "misc.h"
#define d(x)
/************ RDF Parser *******************/
......@@ -347,14 +360,15 @@ layer_find_all (xmlNodePtr node,
printf("%s.\n", node->name);
#endif
if (strcasecmp ((char *)node->name, match)==0) {
while (strcasecmp ((char *)node->name, match)==0) {
while (node!=NULL && strcasecmp ((char *)node->name, match)==0) {
if (node->children != NULL && node->children->content != NULL) {
category = g_list_append(category, g_strdup((char *)node->children->content));
}
node = node->next;
}
}
node = node->next;
if (node)
node = node->next;
}
if (category)
return category;
......@@ -1043,7 +1057,7 @@ update_channel(RDF *r)
ftotal++;
if (CF->encl) {
GError *err = NULL;
net_get_unblocking(
fetch_unblocking(
CF->encl,
textcb,
NULL,
......
......@@ -27,6 +27,12 @@ gchar *layer_find_innerhtml (xmlNodePtr node, char *match, char *submatch, char
xmlNodePtr layer_find_pos (xmlNodePtr node, char *match, char *submatch);
char *layer_find_tag (xmlNodePtr node, char *match, char *fail);
gchar *decode_entities(gchar *source);
GList *layer_find_all (xmlNodePtr node, char *match, char *fail);
xmlDoc *parse_html(char *url, const char *html, int len);
xmlDoc *parse_html_sux (const char *buf, guint len);
xmlDoc *xml_parse_sux (const char *buf, int len);
create_feed *parse_channel_line(xmlNode *top, gchar *feed_name, char *main_date);
gchar *tree_walk (xmlNodePtr root, RDF *r);
#endif /*__RSS_H__*/
......@@ -1800,7 +1800,14 @@ rss_folder_factory (EPlugin *epl, EConfigHookItemFactoryData *data)
goto out;
ofolder = lookup_original_folder(folder);
url = g_hash_table_lookup(rf->hr, lookup_key(ofolder));
gpointer key = lookup_key(ofolder);
g_print("key:%s\n", key);
if (!key) {
g_free(ofolder);
goto out;
}
url = g_hash_table_lookup(rf->hr, key);
if (url) {
feed = build_dialog_add(url, ofolder);
//we do not need ok/cancel buttons here
......
......@@ -87,9 +87,9 @@ int rss_verbose_debug = 0;
#include <camel/camel-data-cache.h>
#include <camel/camel-file-utils.h>
#include <libxml/parserInternals.h>
#include <libxml/xmlmemory.h>
#include <libxml/HTMLparser.h>
//#include <libxml/parserInternals.h>
//#include <libxml/xmlmemory.h>
//#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
#ifdef HAVE_RENDERKIT
......@@ -140,7 +140,7 @@ int rss_verbose_debug = 0;
#endif
#include "rss-config-factory.h"
#include "rss-icon-factory.h"
#include "parser.c"
#include "parser.h"
int pop = 0;
GtkWidget *flabel;
......@@ -183,6 +183,7 @@ extern int xmlSubstituteEntitiesDefaultValue;
extern EProxy *proxy;
SoupSession *webkit_session = NULL;
SoupCookieJar *rss_soup_jar;
extern guint rsserror;
rssfeed *rf = NULL;
guint upgrade = 0; // set to 2 when initailization successfull
......
Supports Markdown
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