changed sock_read() in some files to sock_gets().
[claws.git] / src / news.c
index 60f4a54e864f7dbba4de8f850ddcc6f84152c44c..27a500221133c976b268ddfdc7e4dc4e56e2f2e0 100644 (file)
@@ -137,8 +137,11 @@ static Session *news_session_new_for_folder(Folder *folder)
                userid = ac->userid;
                if (ac->passwd && ac->passwd[0])
                        passwd = g_strdup(ac->passwd);
-               else
+               else {
                        passwd = news_query_password(ac->nntp_server, userid);
+                       if (!passwd)
+                               userid = NULL;
+               }
        } else {
                userid = passwd = NULL;
        }
@@ -373,7 +376,7 @@ static GSList *news_get_uncached_articles(NNTPSession *session,
        }
 
        for (;;) {
-               if (sock_read(SESSION(session)->sock, buf, sizeof(buf)) < 0) {
+               if (sock_gets(SESSION(session)->sock, buf, sizeof(buf)) < 0) {
                        log_warning(_("error occurred while getting xover.\n"));
                        return newlist;
                }