# HG changeset patch # User Yoshiki Yazawa # Date 1228323815 -32400 # Node ID b2c64cd550da4f2e94c779e1dba9378fc3991e75 # Parent e9a7c018a952620c81426bb87244e45e2b0af9d8 added error check code for testing in got_page_cb(). diff -r e9a7c018a952 -r b2c64cd550da icon.c --- a/icon.c Thu Dec 04 00:18:38 2008 +0900 +++ b/icon.c Thu Dec 04 02:03:35 2008 +0900 @@ -187,6 +187,18 @@ return; } + /* if we receive bad response */ + if(!strstr(url_text, "HTTP/1.1 200 OK") && + !strstr(url_text, "HTTP/1.0 200 OK")) { + if(data) { + data->requested = FALSE; + data->fetch_data = NULL; + } + g_free(gotdata->user_name); + g_free(gotdata); + return; + } + /* setup image url */ /* xxx need simplify --yaz */ g_regex_match(regp[regp_id], url_text, 0, &match_info); if(!g_match_info_matches(match_info)) { @@ -198,11 +210,13 @@ url = g_strdup(TWITTER_DEFAULT_ICON_URL); } else if(service == identica_service) { - twitter_debug("fall back to identica default icon\n"); + twitter_debug("fall back to identica default icon: %s\n", + gotdata->user_name); url = g_strdup(IDENTICA_DEFAULT_ICON_URL); } else if(service == jisko_service) { - twitter_debug("fall back to jisko default icon\n"); + twitter_debug("fall back to jisko default icon: %s\n", + gotdata->user_name); url = g_strdup(JISKO_DEFAULT_ICON_URL); } else {