Mercurial > pidgin.yaz
comparison src/protocols/msn/notification.c @ 7198:78f3252e9d10
[gaim-migrate @ 7767]
Error text in the dialog now displays CORRECTLY when logging into MSN with
invalid info. My fix the other day was sucky and didn't work.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Wed, 08 Oct 2003 23:27:22 +0000 |
parents | 1f4e74bfe5bc |
children | 448e39ace278 |
comparison
equal
deleted
inserted
replaced
7197:1f4e74bfe5bc | 7198:78f3252e9d10 |
---|---|
422 GAIM_SSL_DEFAULT_PORT, | 422 GAIM_SSL_DEFAULT_PORT, |
423 login_connect_cb, servconn); | 423 login_connect_cb, servconn); |
424 } | 424 } |
425 else if (strstr(buffer, "HTTP/1.1 401 Unauthorized") != NULL) | 425 else if (strstr(buffer, "HTTP/1.1 401 Unauthorized") != NULL) |
426 { | 426 { |
427 const char *error; | 427 const char *error, *c; |
428 char *temp; | |
428 | 429 |
429 if ((error = strstr(buffer, "WWW-Authenticate")) != NULL) | 430 if ((error = strstr(buffer, "WWW-Authenticate")) != NULL) |
430 { | 431 { |
431 if ((error = strstr(error, "cbtxt=")) != NULL) | 432 if ((error = strstr(error, "cbtxt=")) != NULL) |
432 { | 433 { |
433 error += strlen("cbtxt="); | 434 error += strlen("cbtxt="); |
434 error = gaim_url_decode(error); | 435 |
436 if ((c = strchr(error, '\n')) == NULL) | |
437 c = error + strlen(error); | |
438 | |
439 temp = g_strndup(error, c - error); | |
440 error = gaim_url_decode(temp); | |
441 g_free(temp); | |
435 } | 442 } |
436 } | 443 } |
437 | 444 |
438 if (error == NULL) | 445 if (error == NULL) |
439 { | 446 { |