Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo.c @ 21425:cd4173014f50
Use PURPLE_CONNECTION_ERROR_INVALID_USERNAME in oscar and yahoo, which were
the only places I could find where it could be used.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sun, 11 Nov 2007 21:41:59 +0000 |
parents | 38cc722159ff |
children | 9dbf38f270da |
comparison
equal
deleted
inserted
replaced
21424:ba061949650c | 21425:cd4173014f50 |
---|---|
2088 int err = 0; | 2088 int err = 0; |
2089 char *msg; | 2089 char *msg; |
2090 char *url = NULL; | 2090 char *url = NULL; |
2091 char *fullmsg; | 2091 char *fullmsg; |
2092 PurpleAccount *account = gc->account; | 2092 PurpleAccount *account = gc->account; |
2093 PurpleConnectionError reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; | |
2093 | 2094 |
2094 while (l) { | 2095 while (l) { |
2095 struct yahoo_pair *pair = l->data; | 2096 struct yahoo_pair *pair = l->data; |
2096 | 2097 |
2097 if (pair->key == 66) | 2098 if (pair->key == 66) |
2103 } | 2104 } |
2104 | 2105 |
2105 switch (err) { | 2106 switch (err) { |
2106 case 3: | 2107 case 3: |
2107 msg = g_strdup(_("Invalid screen name.")); | 2108 msg = g_strdup(_("Invalid screen name.")); |
2109 reason = PURPLE_CONNECTION_ERROR_INVALID_USERNAME; | |
2108 break; | 2110 break; |
2109 case 13: | 2111 case 13: |
2110 #ifdef TRY_WEBMESSENGER_LOGIN | 2112 #ifdef TRY_WEBMESSENGER_LOGIN |
2111 if (!yd->wm) { | 2113 if (!yd->wm) { |
2112 PurpleUtilFetchUrlData *url_data; | 2114 PurpleUtilFetchUrlData *url_data; |
2137 if (url) | 2139 if (url) |
2138 fullmsg = g_strdup_printf("%s\n%s", msg, url); | 2140 fullmsg = g_strdup_printf("%s\n%s", msg, url); |
2139 else | 2141 else |
2140 fullmsg = g_strdup(msg); | 2142 fullmsg = g_strdup(msg); |
2141 | 2143 |
2142 purple_connection_error_reason(gc, PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED, fullmsg); | 2144 purple_connection_error_reason(gc, reason, fullmsg); |
2143 g_free(msg); | 2145 g_free(msg); |
2144 g_free(fullmsg); | 2146 g_free(fullmsg); |
2145 } | 2147 } |
2146 | 2148 |
2147 static void yahoo_process_addbuddy(PurpleConnection *gc, struct yahoo_packet *pkt) | 2149 static void yahoo_process_addbuddy(PurpleConnection *gc, struct yahoo_packet *pkt) |