Revision 1c20061f1779e9e2b50fda49c6951e7ad79589d7
evands at pidgin.im
evands at pidgin.im
Tue Mar 13 06:45:40 EDT 2007
o -----------------------------------------------------------------
|\ Revision: 1c20061f1779e9e2b50fda49c6951e7ad79589d7
| | Ancestor: 1e5814c18dbd7349240ceeec8f3d25583e42a7bd
| | Ancestor: 8fd51b26e00adf83c2b8a53c556b308efa1c6c51
| | Author: evands at pidgin.im
| | Date: 2007-03-13T10:28:03
| | Branch: im.pidgin.pidgin
| |
| | Modified files:
| | libpurple/connection.c libpurple/plugins/ssl/ssl-gnutls.c
| | libpurple/protocols/jabber/roster.c
| | libpurple/protocols/jabber/si.c
| | libpurple/protocols/msn/msn-utils.c
| | libpurple/protocols/novell/nmuser.c
| | pidgin/gtkimhtmltoolbar.c
| | pidgin/plugins/musicmessaging/musicmessaging.c
| |
| | ChangeLog:
| |
| | merge of '1e5814c18dbd7349240ceeec8f3d25583e42a7bd'
| | and '8fd51b26e00adf83c2b8a53c556b308efa1c6c51'
| |
| | ============================================================
| | --- libpurple/protocols/msn/msn-utils.c c001fcb8c31329f5516e28c92c284ae1ee267892
| | +++ libpurple/protocols/msn/msn-utils.c 817c70476a43419c5865bc63cca520c28e80cb7b
| | @@ -174,6 +174,11 @@ msn_import_html(const char *html, char *
| | char fonteffect[4];
| | char fontcolor[7];
| |
| | + gboolean has_bold = FALSE;
| | + gboolean has_italic = FALSE;
| | + gboolean has_underline = FALSE;
| | + gboolean has_strikethrough = FALSE;
| | +
| | g_return_if_fail(html != NULL);
| | g_return_if_fail(attributes != NULL);
| | g_return_if_fail(message != NULL);
| | @@ -197,22 +202,38 @@ msn_import_html(const char *html, char *
| | }
| | else if (!g_ascii_strncasecmp(c + 1, "i>", 2))
| | {
| | - strcat(fonteffect, "I");
| | + if (!has_italic)
| | + {
| | + strcat(fonteffect, "I");
| | + has_italic = TRUE;
| | + }
| | c += 3;
| | }
| | else if (!g_ascii_strncasecmp(c + 1, "b>", 2))
| | {
| | - strcat(fonteffect, "B");
| | + if (!has_bold)
| | + {
| | + strcat(fonteffect, "B");
| | + has_bold = TRUE;
| | + }
| | c += 3;
| | }
| | else if (!g_ascii_strncasecmp(c + 1, "u>", 2))
| | {
| | - strcat(fonteffect, "U");
| | + if (!has_underline)
| | + {
| | + strcat(fonteffect, "U");
| | + has_underline = TRUE;
| | + }
| | c += 3;
| | }
| | else if (!g_ascii_strncasecmp(c + 1, "s>", 2))
| | {
| | - strcat(fonteffect, "S");
| | + if (!has_strikethrough)
| | + {
| | + strcat(fonteffect, "S");
| | + has_strikethrough = TRUE;
| | + }
| | c += 3;
| | }
| | else if (!g_ascii_strncasecmp(c + 1, "a href=\"", 8))
| | ============================================================
| | --- libpurple/connection.c be8dc3f9bcde569ab9c715d50f7dbc838d8acdbf
| | +++ libpurple/connection.c 2780735e26f07cdcd53ed64224722280991e995d
| | @@ -434,8 +434,12 @@ gaim_connection_error(GaimConnection *gc
| | GaimConnectionUiOps *ops;
| |
| | g_return_if_fail(gc != NULL);
| | - g_return_if_fail(text != NULL);
| |
| | + if (text != NULL) {
| | + g_critical("gaim_connection_error: check `text != NULL' failed");
| | + text = _("Unknown error");
| | + }
| | +
| | /* If we've already got one error, we don't need any more */
| | if (gc->disconnect_timeout)
| | return;
| | ============================================================
| | --- libpurple/plugins/ssl/ssl-gnutls.c 74208168c2a7bae9418241039fb37150b6e84e85
| | +++ libpurple/plugins/ssl/ssl-gnutls.c a6fc5dc86095e58453cbf8588a18ebc5a4d6125a
| | @@ -83,7 +83,8 @@ static void ssl_gnutls_handshake_cb(gpoi
| | gnutls_data->handshake_handler = 0;
| |
| | if(ret != 0) {
| | - gaim_debug_error("gnutls", "Handshake failed. Error %d\n", ret);
| | + gaim_debug_error("gnutls", "Handshake failed. Error %s\n",
| | + gnutls_strerror(ret));
| |
| | if(gsc->error_cb != NULL)
| | gsc->error_cb(gsc, GAIM_SSL_HANDSHAKE_FAILED,
| | @@ -156,8 +157,16 @@ ssl_gnutls_read(GaimSslConnection *gsc,
| | s = -1;
| | errno = EAGAIN;
| | } else if(s < 0) {
| | - gaim_debug_error("gnutls", "receive failed: %d\n", s);
| | - s = 0;
| | + gaim_debug_error("gnutls", "receive failed: %s\n",
| | + gnutls_strerror(s));
| | + s = -1;
| | + /*
| | + * TODO: Set errno to something more appropriate. Or even
| | + * better: allow ssl plugins to keep track of their
| | + * own error message, then add a new ssl_ops function
| | + * that returns the error message.
| | + */
| | + errno = EIO;
| | }
| |
| | return s;
| | @@ -177,8 +186,16 @@ ssl_gnutls_write(GaimSslConnection *gsc,
| | s = -1;
| | errno = EAGAIN;
| | } else if(s < 0) {
| | - gaim_debug_error("gnutls", "send failed: %d\n", s);
| | - s = 0;
| | + gaim_debug_error("gnutls", "send failed: %s\n",
| | + gnutls_strerror(s));
| | + s = -1;
| | + /*
| | + * TODO: Set errno to something more appropriate. Or even
| | + * better: allow ssl plugins to keep track of their
| | + * own error message, then add a new ssl_ops function
| | + * that returns the error message.
| | + */
| | + errno = EIO;
| | }
| |
| | return s;
| | ============================================================
| | --- libpurple/protocols/jabber/roster.c 5a71828362fc4f322825fd8ad4f325854408ee17
| | +++ libpurple/protocols/jabber/roster.c 553be223e32c9bad69f81eda32fa6b8410962b94
| | @@ -380,7 +380,7 @@ void jabber_roster_remove_buddy(GaimConn
| | GSList *groups = NULL;
| |
| | buddies = g_slist_remove(buddies, buddy);
| | - if(g_slist_length(buddies)) {
| | + if(buddies != NULL) {
| | GaimBuddy *tmpbuddy;
| | GaimGroup *tmpgroup;
| |
| | ============================================================
| | --- libpurple/protocols/jabber/si.c 3e841ffef94bb5f5390710d86ada247bab5cc091
| | +++ libpurple/protocols/jabber/si.c 47d760130efc958d0bb131c2ad406ceeccab26b2
| | @@ -783,7 +783,7 @@ static void jabber_si_xfer_init(GaimXfer
| | return;
| |
| | /* XXX: for now, send to the first resource available */
| | - if(g_list_length(jb->resources) >= 1) {
| | + if(jb->resources != NULL) {
| | char **who_v = g_strsplit(xfer->who, "/", 2);
| | char *who;
| |
| | ============================================================
| | --- libpurple/protocols/novell/nmuser.c 702ebcd067b2391a9dfc48d26474bd2120d84950
| | +++ libpurple/protocols/novell/nmuser.c f005ea2bb6b5b7c60f178579384a05ab54580414
| | @@ -1534,13 +1534,12 @@ _handle_multiple_get_details_joinconf_cb
| | }
| |
| | /* Time to callback? */
| | - if (g_slist_length(list) == 0) {
| | + if (list == NULL) {
| | nm_response_cb cb = nm_request_get_callback(request);
| |
| | if (cb) {
| | cb(user, 0, conference, conference);
| | }
| | - g_slist_free(list);
| | nm_release_request(request);
| | }
| | }
| | ============================================================
| | --- pidgin/gtkimhtmltoolbar.c 51de283d5c8966ce4a1998dbc6d8e3904f4c3562
| | +++ pidgin/gtkimhtmltoolbar.c d84c3eab2623835189bd61dd7b3a1d924bb2c7d1
| | @@ -672,7 +672,7 @@ insert_smiley_cb(GtkWidget *smiley, GtkI
| | gtk_window_set_role(GTK_WINDOW(dialog), "smiley_dialog");
| | gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE);
| |
| | - if (g_slist_length(unique_smileys)) {
| | + if (unique_smileys != NULL) {
| | struct smiley_button_list *ls, *it, *it_tmp;
| | GtkWidget *line;
| | int line_width = 0;
| | ============================================================
| | --- pidgin/plugins/musicmessaging/musicmessaging.c 6cae0b1bca6a24b5bb90dd8af1af797721f8a22a
| | +++ pidgin/plugins/musicmessaging/musicmessaging.c de324a5a4ab466bc0967dacdc2ba1f8bf8f4272e
| | @@ -235,16 +235,19 @@ mmconv_from_conv_loc(GaimConversation *c
| | static int
| | mmconv_from_conv_loc(GaimConversation *conv)
| | {
| | + GList *l;
| | MMConversation *mmconv_current = NULL;
| | guint i;
| |
| | - for (i = 0; i < g_list_length(conversations); i++)
| | + i = 0;
| | + for (l = conversations; l != NULL; l = l->next)
| | {
| | - mmconv_current = (MMConversation *)g_list_nth_data(conversations, i);
| | + mmconv_current = l->data;
| | if (conv == mmconv_current->conv)
| | {
| | return i;
| | }
| | + i++;
| | }
| | return -1;
| | }
| | @@ -295,9 +298,9 @@ plugin_unload(GaimPlugin *plugin) {
| | plugin_unload(GaimPlugin *plugin) {
| | MMConversation *mmconv = NULL;
| |
| | - while (g_list_length(conversations) > 0)
| | + while (conversations != NULL)
| | {
| | - mmconv = g_list_first(conversations)->data;
| | + mmconv = conversations->data;
| | conv_destroyed(mmconv->conv);
| | }
| | return TRUE;
To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 1c20061f1779e9e2b50fda49c6951e7ad79589d7
More information about the Commits
mailing list