~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/comments.c

  • Committer: Package Import Robot
  • Author(s): bojo42
  • Date: 2012-03-29 14:17:21 UTC
  • mfrom: (1.3.9) (3.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120329141721-tbfopcrc5797wxt7
Tags: 1.8.3-0.1ubuntu1
* New upstream release (LP: #290666, #371754, #741543, #716688)
* Merge from Debian unstable (LP: #935147), remaining changes:
* debian/patches:
  - drop gtk-status-icon.patch & notification-append as in upstream
  - drop fix_systray_behavior as mostly upstreamed and rest seems unused
  - 01_ubuntu_feedlists: update & rename, move planets to "Open Source"  
  - add_X-Ubuntu-Gettext-Domain: rebase
  - libunity.patch: rebase, apply before indicator patch (liferea_shell.c)
  - libindicate_increase_version.patch: exclude from libindicate.patch
  - deactivate libindicate.patch, seems partly upstreamed and needs rework
* debian/control: libindicate-dev, libindicate-gtk-dev & libunity-dev
* debian/liferea.indicate & liferea.install: ship indicator desktop file
* debian/rules: enable libindicate

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include "feed.h"
28
28
#include "metadata.h"
29
29
#include "net.h"
 
30
#include "net_monitor.h"
30
31
#include "update.h"
31
32
#include "ui/itemview.h"
32
33
 
118
119
        if (401 == result->httpstatus) { /* unauthorized */
119
120
                commentFeed->error = g_strdup (_("Authorization Error"));
120
121
        } else if (410 == result->httpstatus) { /* gone */
121
 
                // FIXME: how to prevent further updates?
 
122
                metadata_list_set (&item->metadata, "commentFeedGone", "true");
122
123
        } else if (304 == result->httpstatus) {
123
124
                debug1(DEBUG_UPDATE, "comment feed \"%s\" did not change", result->source);
124
125
        } else if (result->data) {
191
192
        updateRequestPtr        request;
192
193
        const gchar             *url;
193
194
        
194
 
        if (!network_is_online ())
195
 
                return;
 
195
        if (!network_monitor_is_online ())
 
196
                return;
 
197
                
 
198
        if (metadata_list_get (item->metadata, "commentFeedGone")) {
 
199
                debug0 (DEBUG_UPDATE, "Comment feed returned HTTP 410. Not updating anymore!");
 
200
                return;
 
201
        }
196
202
        
197
203
        url = metadata_list_get (item->metadata, "commentFeedUri");
198
204
        if (url) {