Changeset 90fc864
- Timestamp:
- 2011-11-24T08:18:04Z (13 years ago)
- Branches:
- master
- Children:
- 693ff09, e4fc493
- Parents:
- c945ee3
- Location:
- protocols/twitter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/twitter/twitter.h
rc945ee3 r90fc864 39 39 TWITTER_GOT_TIMELINE = 0x20000, 40 40 TWITTER_GOT_MENTIONS = 0x40000, 41 TWITTER_DOING_TIMELINE_SLOW = 0x80000,42 41 } twitter_flags_t; 43 42 -
protocols/twitter/twitter_lib.c
rc945ee3 r90fc864 727 727 gboolean include_mentions = set_getbool(&ic->acc->set, "fetch_mentions"); 728 728 729 if ((td->flags & 0xf0000) == (TWITTER_DOING_TIMELINE | TWITTER_DOING_TIMELINE_SLOW)) {730 imcb_log(ic, "Connection seems to have stalled again.\n"731 "This is a known bug, if you see this happen a lot "732 "please generate some traffic dumps.");733 td->flags &= ~0xf0000;734 }735 736 729 if (td->flags & TWITTER_DOING_TIMELINE) { 737 /* This shouldn't normally happen at all but I'm currently hunting a bug738 where it does. Instead of having users suffer under it, have a work-739 around with a warning. */740 td->flags |= TWITTER_DOING_TIMELINE_SLOW;741 730 return; 742 731 } … … 828 817 } 829 818 830 twitter_http(ic, TWITTER_HOME_TIMELINE_URL, twitter_http_get_home_timeline, ic, 0, args, 831 td->timeline_id ? 6 : 4); 819 if (twitter_http(ic, TWITTER_HOME_TIMELINE_URL, twitter_http_get_home_timeline, ic, 0, args, 820 td->timeline_id ? 6 : 4) == NULL) { 821 if (++td->http_fails >= 5) 822 imcb_error(ic, "Could not retrieve %s: %s", 823 TWITTER_HOME_TIMELINE_URL, "connection failed"); 824 td->flags |= TWITTER_GOT_TIMELINE; 825 twitter_flush_timeline(ic); 826 } 832 827 833 828 g_free(args[1]); … … 857 852 } 858 853 859 twitter_http(ic, TWITTER_MENTIONS_URL, twitter_http_get_mentions, ic, 0, args, 860 td->timeline_id ? 6 : 4); 854 if (twitter_http(ic, TWITTER_MENTIONS_URL, twitter_http_get_mentions, ic, 0, args, 855 td->timeline_id ? 6 : 4) == NULL) { 856 if (++td->http_fails >= 5) 857 imcb_error(ic, "Could not retrieve %s: %s", 858 TWITTER_MENTIONS_URL, "connection failed"); 859 td->flags |= TWITTER_GOT_MENTIONS; 860 twitter_flush_timeline(ic); 861 } 861 862 862 863 g_free(args[1]); … … 946 947 // It didn't go well, output the error and return. 947 948 if (++td->http_fails >= 5) 948 imcb_error(ic, "Could not retrieve " TWITTER_MENTIONS_URL ": %s",949 twitter_parse_error(req));949 imcb_error(ic, "Could not retrieve %s: %s", 950 TWITTER_MENTIONS_URL, twitter_parse_error(req)); 950 951 951 952 goto end;
Note: See TracChangeset
for help on using the changeset viewer.