# HG changeset patch # User Mark Doliner # Date 1053882390 0 # Node ID 5664dbaf670c81a075f773eaec9f84b0f227d95a # Parent d1524728d491613b1620a911362aaea762df3c46 [gaim-migrate @ 5913] This fixes a bug where the global proxy hostname would often not get read from the .gaimrc file correctly. It is described in http://sourceforge.net/tracker/index.php?func=detail&aid=743110&group_id=235&atid=100235 http://sourceforge.net/tracker/index.php?func=detail&aid=742985&group_id=235&atid=100235 The problem was that there was an extra new line at the end of the file, so gaimrc_parse_tag was unable to read in a new prefs section, and it would end up deciding that you were trying to read in the "proxy" section again because it used the same memory it used the previous time it was called, which meant that the buffer contained "proxy." I think I caused this with the following commit: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gaim/gaim/src/gaimrc.c.diff?r1=1.160&r2=1.162 committer: Tailor Script diff -r d1524728d491 -r 5664dbaf670c src/gaimrc.c --- a/src/gaimrc.c Sun May 25 16:52:35 2003 +0000 +++ b/src/gaimrc.c Sun May 25 17:06:30 2003 +0000 @@ -202,7 +202,8 @@ if (feof(f)) return -1; - sscanf(buf, "%s {", tag); + if (sscanf(buf, "%s {", tag) != 1) + return -1; if (!strcmp(tag, "users")) { return 0; @@ -1507,7 +1508,7 @@ "starting read tag %d\n", tag); switch (tag) { case -1: - /* Let the loop end, EOF */ + /* Do nothing--either EOF or empty line */ break; case 0: gaimrc_read_users(f);