Mercurial > pidgin
changeset 5514:5664dbaf670c
[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 <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 25 May 2003 17:06:30 +0000 |
parents | d1524728d491 |
children | 439a05a6b409 |
files | src/gaimrc.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);