Revision 9b3b5e5e845e8180f39ea97f41e9b1f3ecd8de3c
rlaager at pidgin.im
rlaager at pidgin.im
Tue Mar 27 21:05:23 EDT 2007
o -----------------------------------------------------------------
|\ Revision: 9b3b5e5e845e8180f39ea97f41e9b1f3ecd8de3c
| | Ancestor: 479ec3bc42bb56e872fb1e8d5975ee5cc73f9cb8
| | Ancestor: af97194f292b3a82f2a36fc3094f579a3dfc2841
| | Author: rlaager at pidgin.im
| | Date: 2007-03-26T03:01:33
| | Branch: im.pidgin.pidgin
| |
| | Deleted entries:
| | libpurple/plugins/gaim.pl pidgin/pixmaps/gaim.png
| | pidgin/pixmaps/pidgin.png
| | Renamed entries:
| | doc/gaims_funniest_home_convos.txt to doc/funniest_home_convos.txt
| | gaim.apspec.in to pidgin.apspec.in
| | libpurple/gconf/gaim.schemas.in to libpurple/gconf/purple.schemas.in
| | m4macros/gaim.m4 to m4macros/purple.m4
| | pidgin/pixmaps/gaim.ico to pidgin/pixmaps/pidgin.ico
| | pidgin/pixmaps/gaim.svg to pidgin/pixmaps/pidgin.svg
| | pidgin/plugins/crazychat/cc_gaim_plugin.c to pidgin/plugins/crazychat/cc_pidgin_plugin.c
| | pidgin/plugins/gaimrc.c to pidgin/plugins/pidginrc.c
| | Modified files:
| | Makefile.am configure.ac doc/Makefile.am
| | finch/libgnt/gntfilesel.c finch/libgnt/gntfilesel.h
| | finch/plugins/Makefile.am finch/plugins/gntclipboard.c
| | libpurple/gconf/Makefile.am
| | libpurple/gconf/purple.schemas.in libpurple/log.c
| | libpurple/nat-pmp.c libpurple/nat-pmp.h libpurple/network.c
| | libpurple/plugin.c libpurple/plugins/Makefile.am
| | libpurple/prefs.c libpurple/protocols/bonjour/bonjour.c
| | libpurple/protocols/jabber/auth.c
| | libpurple/protocols/jabber/jabber.c
| | libpurple/protocols/jabber/jutil.c
| | libpurple/protocols/jabber/jutil.h
| | libpurple/protocols/jabber/message.c
| | libpurple/protocols/jabber/presence.c
| | libpurple/protocols/oscar/oscar_data.c
| | libpurple/protocols/oscar/peer.h
| | libpurple/protocols/yahoo/yahoo_packet.c
| | libpurple/tests/test_jabber_jutil.c libpurple/util.c
| | libpurple/xmlnode.c m4macros/Makefile.am m4macros/purple.m4
| | pidgin/gtkblist.c pidgin/pixmaps/Makefile.am
| | pidgin/pixmaps/emotes/default/22/theme
| | pidgin/plugins/Makefile.am
| | pidgin/plugins/crazychat/Makefile.am
| | pidgin/win32/pidgin_exe_rc.rc.in pidgin.apspec.in
| | pidgin.spec.in po/POTFILES.in
| |
| | ChangeLog:
| |
| | merge of '479ec3bc42bb56e872fb1e8d5975ee5cc73f9cb8'
| | and 'af97194f292b3a82f2a36fc3094f579a3dfc2841'
| |
| | ============================================================
| | --- Makefile.am 40dc54e02a0a41b8d9199dba80cce6099ae2869d
| | +++ Makefile.am 2a8c259ea6b2c181c2c8b85049fc86719f212aae
| | @@ -10,16 +10,16 @@ EXTRA_DIST = \
| | README.SVN \
| | README.dbus \
| | README.mingw \
| | + config.h.mingw \
| | gaim.pc.in \
| | gaim-uninstalled.pc.in \
| | - gaim.apspec.in \
| | gaim.service.in \
| | - pidgin.spec.in \
| | - pidgin.desktop.in \
| | intltool-extract.in \
| | intltool-merge.in \
| | intltool-update.in \
| | - config.h.mingw \
| | + pidgin.apspec.in \
| | + pidgin.spec.in \
| | + pidgin.desktop.in \
| | po/Makefile.mingw
| |
| | noinst_HEADERS = config.h
| | @@ -66,7 +66,7 @@ distuninstallcheck_listfiles = \
| | distuninstallcheck_listfiles = \
| | find . -type f -print | grep -v perl | grep -v Purple.3pm
| |
| | -DISTCLEANFILES= pidgin.desktop libpurple/gconf/gaim.schemas intltool-extract \
| | +DISTCLEANFILES= pidgin.desktop libpurple/gconf/purple.schemas intltool-extract \
| | intltool-merge intltool-update
| |
| | ACLOCAL_AMFLAGS = -I m4
| | ============================================================
| | --- configure.ac c517e4b2580e69d4a47001ecb44a83d1cb61f25f
| | +++ configure.ac 1463e8d613851099a99bcae7e9c86800bfbacc3b
| | @@ -883,7 +883,7 @@ AC_SUBST(CFLAGS)
| | fi
| | AC_SUBST(CFLAGS)
| |
| | -AC_PATH_PROG(gaimpath, gaim)
| | +AC_PATH_PROG(pidginpath, pidgin)
| |
| | dnl #######################################################################
| | dnl # Check for D-Bus libraries
| | @@ -1895,12 +1895,12 @@ AC_OUTPUT([Makefile
| |
| | AC_OUTPUT([Makefile
| | Doxyfile
| | - gaim.apspec
| | gaim.service
| | doc/Makefile
| | doc/pidgin.1
| | doc/finch.1
| | m4macros/Makefile
| | + pidgin.apspec
| | pidgin/Makefile
| | pidgin/pidgin.pc
| | pidgin/pidgin-uninstalled.pc
| | @@ -2031,8 +2031,8 @@ eval eval echo Pidgin will be installed
| | echo Assertions are fatal.......... : $enable_fatal_asserts
| | echo
| | eval eval echo Pidgin will be installed in $bindir.
| | -if test "x$gaimpath" != "x" ; then
| | - echo Warning: You have an old copy of gaim at $gaimpath.
| | +if test "x$pidginpath" != "x" ; then
| | + echo Warning: You have an old copy of Pidgin at $pidginpath.
| | fi
| | echo
| | echo configure complete, now type \'make\'
| | ============================================================
| | --- doc/Makefile.am b151c4d580c9f420282df172b6cf22ed7e71bb9f
| | +++ doc/Makefile.am df7060cd50de7ba56c1c031cb220e5b7e4f0e68d
| | @@ -12,7 +12,7 @@ EXTRA_DIST = \
| | conversation-signals.dox \
| | core-signals.dox \
| | dbus-server-signals.dox \
| | - gaims_funniest_home_convos.txt \
| | + funniest_home_convos.txt \
| | finch.1.in \
| | gtkaccount-signals.dox \
| | gtkblist-signals.dox \
| | ============================================================
| | --- finch/libgnt/gntfilesel.c 5cd1751de2cc8ba264bd489e345ac5fc6e757c6d
| | +++ finch/libgnt/gntfilesel.c c7efb481d2495dfbbf09e74d06bae247dcfd914c
| | @@ -28,6 +28,10 @@ gnt_file_sel_destroy(GntWidget *widget)
| | {
| | GntFileSel *sel = GNT_FILE_SEL(widget);
| | g_free(sel->current);
| | + if (sel->tags) {
| | + g_list_foreach(sel->tags, (GFunc)g_free, NULL);
| | + g_list_free(sel->tags);
| | + }
| | }
| |
| | static char *
| | @@ -73,6 +77,15 @@ static gboolean
| | }
| |
| | static gboolean
| | +is_tagged(GntFileSel *sel, const char *f)
| | +{
| | + char *ret = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", f);
| | + gboolean find = g_list_find_custom(sel->tags, ret, (GCompareFunc)g_utf8_collate) != NULL;
| | + g_free(ret);
| | + return find;
| | +}
| | +
| | +static gboolean
| | location_changed(GntFileSel *sel, GError **err)
| | {
| | GDir *dir;
| | @@ -109,15 +122,19 @@ location_changed(GntFileSel *sel, GError
| | if (stat(fp, &st)) {
| | g_printerr("Error stating location %s\n", fp);
| | } else {
| | - if (S_ISDIR(st.st_mode))
| | + if (S_ISDIR(st.st_mode)) {
| | gnt_tree_add_row_after(GNT_TREE(sel->dirs), g_strdup(str),
| | gnt_tree_create_row(GNT_TREE(sel->dirs), str), NULL, NULL);
| | - else if (!sel->dirsonly) {
| | + if (sel->multiselect && sel->dirsonly && is_tagged(sel, str))
| | + gnt_tree_set_row_flags(GNT_TREE(sel->dirs), (gpointer)str, GNT_TEXT_FLAG_BOLD);
| | + } else if (!sel->dirsonly) {
| | char size[128];
| | snprintf(size, sizeof(size), "%ld", (long)st.st_size);
| |
| | gnt_tree_add_row_after(GNT_TREE(sel->files), g_strdup(str),
| | gnt_tree_create_row(GNT_TREE(sel->files), str, size, ""), NULL, NULL);
| | + if (sel->multiselect && is_tagged(sel, str))
| | + gnt_tree_set_row_flags(GNT_TREE(sel->files), (gpointer)str, GNT_TEXT_FLAG_BOLD);
| | }
| | }
| | g_free(fp);
| | @@ -131,7 +148,6 @@ dir_key_pressed(GntTree *tree, const cha
| | dir_key_pressed(GntTree *tree, const char *key, GntFileSel *sel)
| | {
| | if (strcmp(key, "\r") == 0) {
| | - /* XXX: if we are moving up the tree, make sure the current node is selected after the redraw */
| | char *str = g_strdup(gnt_tree_get_selection_data(tree));
| | char *path = g_build_filename(sel->current, str, NULL);
| | char *dir = g_path_get_basename(sel->current);
| | @@ -225,7 +241,7 @@ gnt_file_sel_map(GntWidget *widget)
| |
| | vbox = gnt_vbox_new(FALSE);
| | gnt_box_set_pad(GNT_BOX(vbox), 0);
| | - gnt_box_set_alignment(GNT_BOX(vbox), GNT_ALIGN_LEFT);
| | + gnt_box_set_alignment(GNT_BOX(vbox), GNT_ALIGN_MID);
| |
| | /* The dir. and files list */
| | hbox = gnt_hbox_new(FALSE);
| | @@ -253,9 +269,64 @@ gnt_file_sel_map(GntWidget *widget)
| | update_location(sel);
| | }
| |
| | +static gboolean
| | +toggle_tag_selection(GntBindable *bind, GList *null)
| | +{
| | + GntFileSel *sel = GNT_FILE_SEL(bind);
| | + char *str;
| | + GList *find;
| | + char *file;
| | + GntWidget *tree;
| | +
| | + if (!sel->multiselect)
| | + return FALSE;
| | + tree = sel->dirsonly ? sel->dirs : sel->files;
| | + if (!gnt_widget_has_focus(tree))
| | + return FALSE;
| | +
| | + file = gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files));
| | +
| | + str = gnt_file_sel_get_selected_file(sel);
| | + if ((find = g_list_find_custom(sel->tags, str, (GCompareFunc)g_utf8_collate)) != NULL) {
| | + g_free(find->data);
| | + sel->tags = g_list_delete_link(sel->tags, find);
| | + gnt_tree_set_row_flags(GNT_TREE(tree), file, GNT_TEXT_FLAG_NORMAL);
| | + g_free(str);
| | + } else {
| | + sel->tags = g_list_prepend(sel->tags, str);
| | + gnt_tree_set_row_flags(GNT_TREE(tree), file, GNT_TEXT_FLAG_BOLD);
| | + }
| | +
| | + return TRUE;
| | +}
| | +
| | +static gboolean
| | +clear_tags(GntBindable *bind, GList *null)
| | +{
| | + GntFileSel *sel = GNT_FILE_SEL(bind);
| | + GntWidget *tree;
| | + GList *iter;
| | +
| | + if (!sel->multiselect)
| | + return FALSE;
| | + tree = sel->dirsonly ? sel->dirs : sel->files;
| | + if (!gnt_widget_has_focus(tree))
| | + return FALSE;
| | +
| | + g_list_foreach(sel->tags, (GFunc)g_free, NULL);
| | + g_list_free(sel->tags);
| | + sel->tags = NULL;
| | +
| | + for (iter = GNT_TREE(tree)->list; iter; iter = iter->next)
| | + gnt_tree_set_row_flags(GNT_TREE(tree), iter->data, GNT_TEXT_FLAG_NORMAL);
| | +
| | + return TRUE;
| | +}
| | +
| | static void
| | gnt_file_sel_class_init(GntFileSelClass *klass)
| | {
| | + GntBindableClass *bindable = GNT_BINDABLE_CLASS(klass);
| | GntWidgetClass *kl = GNT_WIDGET_CLASS(klass);
| | parent_class = GNT_WINDOW_CLASS(klass);
| | kl->destroy = gnt_file_sel_destroy;
| | @@ -270,6 +341,9 @@ gnt_file_sel_class_init(GntFileSelClass
| | NULL, NULL,
| | gnt_closure_marshal_VOID__STRING_STRING,
| | G_TYPE_NONE, 0);
| | +
| | + gnt_bindable_class_register_action(bindable, "toggle-tag", toggle_tag_selection, "t", NULL);
| | + gnt_bindable_class_register_action(bindable, "clear-tags", clear_tags, "c", NULL);
| | gnt_style_read_actions(G_OBJECT_CLASS_TYPE(klass), GNT_BINDABLE_CLASS(klass));
| |
| | GNTDEBUG;
| | @@ -312,7 +386,7 @@ gnt_file_sel_get_gtype(void)
| | return type;
| | }
| |
| | -GntWidget *gnt_file_sel_new()
| | +GntWidget *gnt_file_sel_new(void)
| | {
| | GntWidget *widget = g_object_new(GNT_TYPE_FILE_SEL, NULL);
| | GntFileSel *sel = GNT_FILE_SEL(widget);
| | @@ -375,3 +449,46 @@ gboolean gnt_file_sel_get_dirs_only(GntF
| | return sel->dirsonly;
| | }
| |
| | +char *gnt_file_sel_get_selected_file(GntFileSel *sel)
| | +{
| | + char *ret;
| | + const char *tmp;
| | + tmp = (const char*)gnt_tree_get_selection_data(sel->dirsonly ? GNT_TREE(sel->dirs) : GNT_TREE(sel->files));
| | + ret = g_strdup_printf("%s%s%s", sel->current, sel->current[1] ? G_DIR_SEPARATOR_S : "", tmp ? tmp : "");
| | + return ret;
| | +}
| | +
| | +void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must)
| | +{
| | + /*XXX: What do I do with this? */
| | + sel->must_exist = must;
| | +}
| | +
| | +gboolean gnt_file_sel_get_must_exist(GntFileSel *sel)
| | +{
| | + return sel->must_exist;
| | +}
| | +
| | +void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set)
| | +{
| | + sel->multiselect = set;
| | +}
| | +
| | +GList *gnt_file_sel_get_selected_multi_files(GntFileSel *sel)
| | +{
| | + GList *list = NULL, *iter;
| | + char *str = gnt_file_sel_get_selected_file(sel);
| | +
| | + for (iter = sel->tags; iter; iter = iter->next) {
| | + list = g_list_prepend(list, g_strdup(iter->data));
| | + if (g_utf8_collate(str, iter->data)) {
| | + g_free(str);
| | + str = NULL;
| | + }
| | + }
| | + if (str)
| | + list = g_list_prepend(list, str);
| | + list = g_list_reverse(list);
| | + return list;
| | +}
| | +
| | ============================================================
| | --- finch/libgnt/gntfilesel.h af313756974c65a7203b81ec0a933fb56822c69c
| | +++ finch/libgnt/gntfilesel.h f98947e5d0bd0bbb2c1a36818486446e3e7a58f5
| | @@ -17,11 +17,11 @@
| | #define GNT_FILE_SEL_SET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) |= flags)
| | #define GNT_FILE_SEL_UNSET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) &= ~(flags))
| |
| | -typedef struct _GnFileSel GntFileSel;
| | -typedef struct _GnFileSelPriv GntFileSelPriv;
| | -typedef struct _GnFileSelClass GntFileSelClass;
| | +typedef struct _GntFileSel GntFileSel;
| | +typedef struct _GntFileSelPriv GntFileSelPriv;
| | +typedef struct _GntFileSelClass GntFileSelClass;
| |
| | -struct _GnFileSel
| | +struct _GntFileSel
| | {
| | GntWindow parent;
| |
| | @@ -36,9 +36,11 @@ struct _GnFileSel
| | /* XXX: someone should make these useful */
| | gboolean must_exist; /* Make sure the selected file (the name entered in 'location') exists */
| | gboolean dirsonly; /* Show only directories */
| | + gboolean multiselect;
| | + GList *tags; /* List of tagged files when multiselect is set */
| | };
| |
| | -struct _GnFileSelClass
| | +struct _GntFileSelClass
| | {
| | GntWindowClass parent;
| |
| | @@ -53,16 +55,24 @@ GType gnt_file_sel_get_gtype(void);
| |
| | GType gnt_file_sel_get_gtype(void);
| |
| | -GntWidget *gnt_file_sel_new();
| | +GntWidget *gnt_file_sel_new(void);
| |
| | gboolean gnt_file_sel_set_current_location(GntFileSel *sel, const char *path);
| |
| | -const char *gnt_file_sel_get_current_location(GntFileSel *sel);
| | -
| | void gnt_file_sel_set_dirs_only(GntFileSel *sel, gboolean dirs);
| |
| | gboolean gnt_file_sel_get_dirs_only(GntFileSel *sel);
| |
| | +void gnt_file_sel_set_must_exist(GntFileSel *sel, gboolean must);
| | +
| | +gboolean gnt_file_sel_get_must_exist(GntFileSel *sel);
| | +
| | +char *gnt_file_sel_get_selected_file(GntFileSel *sel); /* The returned value should be free'd */
| | +
| | +GList *gnt_file_sel_get_selected_multi_files(GntFileSel *sel);
| | +
| | +void gnt_file_sel_set_multi_select(GntFileSel *sel, gboolean set);
| | +
| | G_END_DECLS
| |
| | #endif /* GNT_FILE_SEL_H */
| | ============================================================
| | --- finch/plugins/Makefile.am 02c982f3572f180c92392d56b5784a7bfe7a0b44
| | +++ finch/plugins/Makefile.am 788afb20a009ed2aa912ff2b4bcfc3ab38c6c3e0
| | @@ -1,3 +1,4 @@
| | +gntclipboard_la_LDFLAGS = -module -avoid-version
| | gntgf_la_LDFLAGS = -module -avoid-version
| | gnthistory_la_LDFLAGS = -module -avoid-version
| | gntlastlog_la_LDFLAGS = -module -avoid-version
| | @@ -5,18 +6,21 @@ plugin_LTLIBRARIES = \
| | if PLUGINS
| |
| | plugin_LTLIBRARIES = \
| | + gntclipboard.la \
| | gntgf.la \
| | gnthistory.la \
| | gntlastlog.la
| |
| | plugindir = $(libdir)/finch
| |
| | +gntclipboard_la_SOURCES = gntclipboard.c
| | gntgf_la_SOURCES = gntgf.c
| | gnthistory_la_SOURCES = gnthistory.c
| | gntlastlog_la_SOURCES = lastlog.c
| |
| | gntgf_la_CFLAGS = $(X11_CFLAGS)
| |
| | +gntclipboard_la_LIBADD = $(GLIB_LIBS)
| | gntgf_la_LIBADD = $(GLIB_LIBS) $(X11_LIBS) $(top_builddir)/finch/libgnt/libgnt.la
| | gnthistory_la_LIBADD = $(GLIB_LIBS)
| | gntlastlog_la_LIBADD = $(GLIB_LIBS)
| | ============================================================
| | --- finch/plugins/gntclipboard.c b608256e1a88532cd9f10b04b16514bec0212487
| | +++ finch/plugins/gntclipboard.c ca6133b58589fc324e0dd4c8b09f142e1ba27bdf
| | @@ -110,10 +110,12 @@ plugin_load(PurplePlugin *plugin)
| | static gboolean
| | plugin_load(PurplePlugin *plugin)
| | {
| | +#ifdef HAVE_X11
| | if (!XOpenDisplay(NULL)) {
| | purple_debug_warning("gntclipboard", "Couldn't find X display\n");
| | return FALSE;
| | }
| | +#endif
| | if (!getenv("WINDOWID")) {
| | purple_debug_warning("gntclipboard", "Couldn't find window\n");
| | return FALSE;
| | ============================================================
| | --- libpurple/gconf/Makefile.am 508816f3dc88b235fbbfb7993d167254d943d0c0
| | +++ libpurple/gconf/Makefile.am 1dbd6d8ab5fba539628f19c034621749aebda223
| | @@ -1,8 +1,8 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@
| | schemadir = @GCONF_SCHEMA_FILE_DIR@
| |
| | -EXTRA_DIST = gaim.schemas.in
| | +EXTRA_DIST = purple.schemas.in
| |
| | -schema_in_files = gaim.schemas.in
| | +schema_in_files = purple.schemas.in
| | schema_DATA = $(schema_in_files:.schemas.in=.schemas)
| | @INTLTOOL_SCHEMAS_RULE@
| |
| | ============================================================
| | --- libpurple/gconf/gaim.schemas.in 5b66f70b01aa1b1c968ce2c32b8cdd5a5aedab60
| | +++ libpurple/gconf/purple.schemas.in 9075dadca3597ae0bb05d89ec7e574508f29bb46
| | @@ -1,10 +1,10 @@
| | <?xml version="1.0"?>
| | <gconfschemafile>
| | <schemalist>
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/aim/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/aim/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -15,9 +15,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/aim/command</key>
| | <applyto>/desktop/gnome/url-handlers/aim/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "aim" URLs</short>
| | <long>The command used to handle "aim" URLs, if enabled.</long>
| | @@ -26,7 +26,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/aim/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/aim/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | @@ -38,7 +38,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/gg/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/gg/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -49,9 +49,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/gg/command</key>
| | <applyto>/desktop/gnome/url-handlers/gg/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "gg" URLs</short>
| | <long>The command used to handle "gg" URLs, if enabled.</long>
| | @@ -60,7 +60,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/gg/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/gg/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | @@ -72,7 +72,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/icq/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/icq/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -83,9 +83,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/icq/command</key>
| | <applyto>/desktop/gnome/url-handlers/icq/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "icq" URLs</short>
| | <long>The command used to handle "icq" URLs, if enabled.</long>
| | @@ -94,7 +94,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/icq/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/icq/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | @@ -106,7 +106,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/irc/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/irc/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -117,9 +117,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/irc/command</key>
| | <applyto>/desktop/gnome/url-handlers/irc/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "irc" URLs</short>
| | <long>The command used to handle "irc" URLs, if enabled.</long>
| | @@ -128,7 +128,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/irc/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/irc/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | @@ -140,7 +140,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/msnim/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/msnim/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -151,9 +151,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/msnim/command</key>
| | <applyto>/desktop/gnome/url-handlers/msnim/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "msnim" URLs</short>
| | <long>The command used to handle "msnim" URLs, if enabled.</long>
| | @@ -162,7 +162,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/msnim/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/msnim/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | @@ -174,7 +174,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/sip/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/sip/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -185,9 +185,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/sip/command</key>
| | <applyto>/desktop/gnome/url-handlers/sip/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "sip" URLs</short>
| | <long>The command used to handle "sip" URLs, if enabled.</long>
| | @@ -196,7 +196,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/sip/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/sip/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | @@ -208,7 +208,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/xmpp/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/xmpp/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -219,9 +219,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/xmpp/command</key>
| | <applyto>/desktop/gnome/url-handlers/xmpp/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "xmpp" URLs</short>
| | <long>The command used to handle "xmpp" URLs, if enabled.</long>
| | @@ -230,7 +230,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/xmpp/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/xmpp/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | @@ -242,7 +242,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/ymsgr/enabled</key>
| | <applyto>/desktop/gnome/url-handlers/ymsgr/enabled</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>true</default>
| | <locale name="C">
| | @@ -253,9 +253,9 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/ymsgr/command</key>
| | <applyto>/desktop/gnome/url-handlers/ymsgr/command</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>string</type>
| | - <default>pidgin-url-handler "%s"</default>
| | + <default>purple-url-handler "%s"</default>
| | <locale name="C">
| | <short>The handler for "ymsgr" URLs</short>
| | <long>The command used to handle "ymsgr" URLs, if enabled.</long>
| | @@ -264,7 +264,7 @@
| | <schema>
| | <key>/schemas/desktop/gnome/url-handlers/ymsgr/needs_terminal</key>
| | <applyto>/desktop/gnome/url-handlers/ymsgr/needs_terminal</applyto>
| | - <owner>gaim</owner>
| | + <owner>purple</owner>
| | <type>bool</type>
| | <default>false</default>
| | <locale name="C">
| | ============================================================
| | --- libpurple/log.c 0af93041712e1c47593cf5991c439d01e9451cae
| | +++ libpurple/log.c 9be83e8f42f40041887ab4a3a8ae4f288c4a4004
| | @@ -638,7 +638,7 @@ void purple_log_init(void)
| | #else
| | #error Unknown size of time_t
| | #endif
| | - purple_value_new(PURPLE_TYPE_STRING), 2,
| | + purple_value_new(PURPLE_TYPE_STRING), 3,
| | purple_value_new(PURPLE_TYPE_SUBTYPE,
| | PURPLE_SUBTYPE_LOG),
| | #if SIZEOF_TIME_T == 4
| | ============================================================
| | --- libpurple/nat-pmp.c b7b50208c7e07447afb75b2f2890bd4dd3b0d91c
| | +++ libpurple/nat-pmp.c 1b6d5102afaebd88f9a17983cdc37b21c36ac1e2
| | @@ -31,15 +31,14 @@
| | #include "nat-pmp.h"
| | #include "debug.h"
| |
| | +#include <arpa/inet.h>
| | +#include <netinet/in.h>
| | #include <sys/types.h>
| | #include <sys/socket.h>
| | #include <sys/sysctl.h>
| |
| | #include <net/route.h>
| | -#include <netinet/in.h>
| |
| | -#include <arpa/inet.h>
| | -
| | #include <netdb.h>
| | #include <stdio.h>
| | #include <stdlib.h>
| | @@ -47,14 +46,47 @@
| | #include <err.h>
| |
| | #include <errno.h>
| | -#include <assert.h>
| | #include <sys/types.h>
| | #include <net/if.h>
| |
| | #ifdef NET_RT_DUMP2
| |
| | -#define PMP_DEBUG
| | +#define PMP_DEBUG 1
| |
| | +typedef struct {
| | + uint8_t version;
| | + uint8_t opcode;
| | +} PurplePmpIpRequest;
| | +
| | +typedef struct {
| | + uint8_t version;
| | + uint8_t opcode; // 128 + n
| | + uint16_t resultcode;
| | + uint32_t epoch;
| | + uint32_t address;
| | +} PurplePmpIpResponse;
| | +
| | +typedef struct {
| | + uint8_t version;
| | + uint8_t opcode;
| | + char reserved[2];
| | + uint16_t privateport;
| | + uint16_t publicport;
| | + uint32_t lifetime;
| | +} PurplePmpMapRequest;
| | +
| | +struct _PurplePmpMapResponse {
| | + uint8_t version;
| | + uint8_t opcode;
| | + uint16_t resultcode;
| | + uint32_t epoch;
| | + uint16_t privateport;
| | + uint16_t publicport;
| | + uint32_t lifetime;
| | +};
| | +
| | +typedef struct _PurplePmpMapResponse PurplePmpMapResponse;
| | +
| | /*
| | * Thanks to R. Matthew Emerson for the fixes on this
| | */
| | @@ -64,7 +96,7 @@
| |
| | #define PMP_VERSION 0
| | #define PMP_PORT 5351
| | -#define PMP_TIMEOUT 250000 // 250000 useconds
| | +#define PMP_TIMEOUT 250000 /* 250000 useconds */
| |
| | /* alignment constraint for routing socket */
| | #define ROUNDUP(a) ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
| | @@ -74,8 +106,8 @@ get_rtaddrs(int bitmask, struct sockaddr
| | get_rtaddrs(int bitmask, struct sockaddr *sa, struct sockaddr *addrs[])
| | {
| | int i;
| | -
| | - for (i = 0; i < RTAX_MAX; i++)
| | +
| | + for (i = 0; i < RTAX_MAX; i++)
| | {
| | if (bitmask & (1 << i))
| | {
| | @@ -93,10 +125,10 @@ is_default_route(struct sockaddr *sa, st
| | is_default_route(struct sockaddr *sa, struct sockaddr *mask)
| | {
| | struct sockaddr_in *sin;
| | -
| | +
| | if (sa->sa_family != AF_INET)
| | return 0;
| | -
| | +
| | sin = (struct sockaddr_in *)sa;
| | if ((sin->sin_addr.s_addr == INADDR_ANY) &&
| | mask &&
| | @@ -127,29 +159,29 @@ default_gw()
| | mib[3] = 0; /* address family - 0 for all addres families */
| | mib[4] = NET_RT_DUMP2;
| | mib[5] = 0;
| | -
| | +
| | /* Determine the buffer side needed to get the full routing table */
| | if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
| | {
| | purple_debug_warning("nat-pmp", "sysctl: net.route.0.0.dump estimate");
| | return NULL;
| | }
| | -
| | +
| | if (!(buf = malloc(needed)))
| | {
| | purple_debug_warning("nat-pmp", "malloc");
| | return NULL;
| | }
| | -
| | +
| | /* Read the routing table into buf */
| | if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0)
| | {
| | purple_debug_warning("nat-pmp", "sysctl: net.route.0.0.dump");
| | return NULL;
| | }
| | -
| | +
| | lim = buf + needed;
| | -
| | +
| | for (next = buf; next < lim; next += rtm->rtm_msglen)
| | {
| | rtm = (struct rt_msghdr2 *)next;
| | @@ -167,15 +199,15 @@ default_gw()
| |
| | get_rtaddrs(rtm->rtm_addrs, sa, rti_info);
| | bzero(&addr, sizeof(addr));
| | -
| | +
| | if (rtm->rtm_addrs & RTA_DST)
| | bcopy(rti_info[RTAX_DST], &addr, rti_info[RTAX_DST]->sa_len);
| | -
| | +
| | bzero(&mask, sizeof(mask));
| | -
| | +
| | if (rtm->rtm_addrs & RTA_NETMASK)
| | bcopy(rti_info[RTAX_NETMASK], &mask, rti_info[RTAX_NETMASK]->sa_len);
| | -
| | +
| | if (rtm->rtm_addrs & RTA_GATEWAY &&
| | is_default_route(&addr, &mask))
| | {
| | @@ -200,26 +232,6 @@ default_gw()
| | }
| |
| | /*!
| | - * double_timeout(struct timeval *) will handle doubling a timeout for backoffs required by NAT-PMP
| | - */
| | -static void
| | -double_timeout(struct timeval *to)
| | -{
| | - int second = 1000000; // number of useconds
| | -
| | - to->tv_sec = (to->tv_sec * 2);
| | - to->tv_usec = (to->tv_usec * 2);
| | -
| | - // Overflow useconds if necessary
| | - if (to->tv_usec >= second)
| | - {
| | - int overflow = (to->tv_usec / second);
| | - to->tv_usec = (to->tv_usec - (overflow * second));
| | - to->tv_sec = (to->tv_sec + overflow);
| | - }
| | -}
| | -
| | -/*!
| | * purple_pmp_get_public_ip() will return the publicly facing IP address of the
| | * default NAT gateway. The function will return NULL if:
| | * - The gateway doesn't support NAT-PMP
| | @@ -229,91 +241,88 @@ purple_pmp_get_public_ip()
| | purple_pmp_get_public_ip()
| | {
| | struct sockaddr_in *gateway = default_gw();
| | -
| | - if (gateway == NULL)
| | +
| | + if (!gateway)
| | {
| | purple_debug_info("nat-pmp", "Cannot request public IP from a NULL gateway!\n");
| | return NULL;
| | }
| | +
| | + /* Default port for NAT-PMP is 5351 */
| | if (gateway->sin_port != PMP_PORT)
| | - {
| | - gateway->sin_port = htons(PMP_PORT); // Default port for NAT-PMP is 5351
| | - }
| | + gateway->sin_port = htons(PMP_PORT);
| |
| | int sendfd;
| | - int req_attempts = 1;
| | struct timeval req_timeout;
| | - pmp_ip_request_t req;
| | - pmp_ip_response_t resp;
| | + PurplePmpIpRequest req;
| | + PurplePmpIpResponse resp;
| | struct sockaddr_in *publicsockaddr = NULL;
| |
| | req_timeout.tv_sec = 0;
| | req_timeout.tv_usec = PMP_TIMEOUT;
| |
| | sendfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
| | -
| | - // Clean out both req and resp structures
| | - bzero(&req, sizeof(pmp_ip_request_t));
| | - bzero(&resp, sizeof(pmp_ip_response_t));
| | +
| | + /* Clean out both req and resp structures */
| | + bzero(&req, sizeof(PurplePmpIpRequest));
| | + bzero(&resp, sizeof(PurplePmpIpResponse));
| | req.version = 0;
| | req.opcode = 0;
| | -
| | - // Attempt to contact NAT-PMP device 9 times as per: draft-cheshire-nat-pmp-02.txt
| | - while (req_attempts < 10)
| | - {
| | +
| | + /* The NAT-PMP spec says we should attempt to contact the gateway 9 times, doubling the time we wait each time.
| | + * Even starting with a timeout of 0.1 seconds, that means that we have a total waiting of 204.6 seconds.
| | + * With the recommended timeout of 0.25 seconds, we're talking 511.5 seconds (8.5 minutes).
| | + *
| | + * This seems really silly... if this were nonblocking, a couple retries might be in order, but it's not at present.
| | + * XXX Make this nonblocking.
| | + */
| | #ifdef PMP_DEBUG
| | - purple_debug_info("nat-pmp", "Attempting to retrieve the public ip address for the NAT device at: %s\n", inet_ntoa(gateway->sin_addr));
| | - purple_debug_info("nat-pmp", "\tTimeout: %ds %dus, Request #: %d\n", req_timeout.tv_sec, req_timeout.tv_usec, req_attempts);
| | + purple_debug_info("nat-pmp", "Attempting to retrieve the public ip address for the NAT device at: %s\n", inet_ntoa(gateway->sin_addr));
| | + purple_debug_info("nat-pmp", "\tTimeout: %ds %dus\n", req_timeout.tv_sec, req_timeout.tv_usec);
| | #endif
| | - struct sockaddr_in addr;
| | - socklen_t len = sizeof(struct sockaddr_in);
| | + struct sockaddr_in addr;
| | + socklen_t len = sizeof(struct sockaddr_in);
| |
| | - if (sendto(sendfd, &req, sizeof(req), 0, (struct sockaddr *)(gateway), sizeof(struct sockaddr)) < 0)
| | + /* TODO: Non-blocking! */
| | + if (sendto(sendfd, &req, sizeof(req), 0, (struct sockaddr *)(gateway), sizeof(struct sockaddr)) < 0)
| | + {
| | + purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP public IP request! (%s)\n", strerror(errno));
| | + g_free(gateway);
| | + return NULL;
| | + }
| | +
| | + if (setsockopt(sendfd, SOL_SOCKET, SO_RCVTIMEO, &req_timeout, sizeof(req_timeout)) < 0)
| | + {
| | + purple_debug_info("nat-pmp", "There was an error setting the socket's options! (%s)\n", strerror(errno));
| | + g_free(gateway);
| | + return NULL;
| | + }
| | +
| | + /* TODO: Non-blocking! */
| | + if (recvfrom(sendfd, &resp, sizeof(PurplePmpIpResponse), 0, (struct sockaddr *)(&addr), &len) < 0)
| | + {
| | + if (errno != EAGAIN)
| | {
| | - purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP public IP request! (%s)\n", strerror(errno));
| | + purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", strerror(errno));
| | + g_free(gateway);
| | return NULL;
| | }
| | -
| | - if (setsockopt(sendfd, SOL_SOCKET, SO_RCVTIMEO, &req_timeout, sizeof(req_timeout)) < 0)
| | - {
| | - purple_debug_info("nat-pmp", "There was an error setting the socket's options! (%s)\n", strerror(errno));
| | - return NULL;
| | - }
| | -
| | - if (recvfrom(sendfd, &resp, sizeof(pmp_ip_response_t), 0, (struct sockaddr *)(&addr), &len) < 0)
| | - {
| | - if ( (errno != EAGAIN) || (req_attempts == 9) )
| | - {
| | - purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", strerror(errno));
| | - return NULL;
| | - }
| | - else
| | - {
| | - goto iterate;
| | - }
| | - }
| | -
| | - if (addr.sin_addr.s_addr != gateway->sin_addr.s_addr)
| | - {
| | - purple_debug_info("nat-pmp", "Response was not received from our gateway! Instead from: %s\n", inet_ntoa(addr.sin_addr));
| | - goto iterate;
| | - }
| | - else
| | - {
| | - publicsockaddr = &addr;
| | - break;
| | - }
| | + }
| |
| | -iterate:
| | - ++req_attempts;
| | - double_timeout(&req_timeout);
| | + if (addr.sin_addr.s_addr == gateway->sin_addr.s_addr)
| | + publicsockaddr = &addr;
| | + else
| | + {
| | + purple_debug_info("nat-pmp", "Response was not received from our gateway! Instead from: %s\n", inet_ntoa(addr.sin_addr));
| | + g_free(gateway);
| | + return NULL;
| | }
| |
| | - if (publicsockaddr == NULL) {
| | + if (!publicsockaddr) {
| | g_free(gateway);
| | return NULL;
| | }
| | -
| | +
| | #ifdef PMP_DEBUG
| | purple_debug_info("nat-pmp", "Response received from NAT-PMP device:\n");
| | purple_debug_info("nat-pmp", "version: %d\n", resp.version);
| | @@ -332,126 +341,122 @@ iterate:
| | return inet_ntoa(publicsockaddr->sin_addr);
| | }
| |
| | -/*!
| | - * will return NULL on error, or a pointer to the pmp_map_response_t type
| | - */
| | -pmp_map_response_t *
| | -purple_pmp_create_map(PurplePmpType type, uint16_t privateport, uint16_t publicport, uint32_t lifetime)
| | +gboolean
| | +purple_pmp_create_map(PurplePmpType type, unsigned short privateport, unsigned short publicport, int lifetime)
| | {
| | - struct sockaddr_in *gateway = default_gw();
| | -
| | - if (gateway == NULL)
| | + struct sockaddr_in *gateway;
| | + gboolean success = TRUE;
| | + int sendfd;
| | + struct timeval req_timeout;
| | + PurplePmpMapRequest req;
| | + PurplePmpMapResponse *resp;
| | +
| | + gateway = default_gw();
| | +
| | + if (!gateway)
| | {
| | purple_debug_info("nat-pmp", "Cannot create mapping on a NULL gateway!\n");
| | - return NULL;
| | + return FALSE;
| | }
| | +
| | + /* Default port for NAT-PMP is 5351 */
| | if (gateway->sin_port != PMP_PORT)
| | - {
| | - gateway->sin_port = htons(PMP_PORT); // Default port for NAT-PMP is 5351
| | - }
| | -
| | - int sendfd;
| | - int req_attempts = 1;
| | - struct timeval req_timeout;
| | - pmp_map_request_t req;
| | - pmp_map_response_t *resp = (pmp_map_response_t *)(malloc(sizeof(pmp_map_response_t)));
| | -
| | + gateway->sin_port = htons(PMP_PORT);
| | +
| | + resp = g_new0(PurplePmpMapResponse, 1);
| | +
| | req_timeout.tv_sec = 0;
| | req_timeout.tv_usec = PMP_TIMEOUT;
| | -
| | +
| | sendfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
| | -
| | - // Clean out both req and resp structures
| | - bzero(&req, sizeof(pmp_map_request_t));
| | - bzero(resp, sizeof(pmp_map_response_t));
| | +
| | + /* Set up the req */
| | + bzero(&req, sizeof(PurplePmpMapRequest));
| | req.version = 0;
| | req.opcode = ((type == PURPLE_PMP_TYPE_UDP) ? PMP_MAP_OPCODE_UDP : PMP_MAP_OPCODE_TCP);
| | req.privateport = htons(privateport); // What a difference byte ordering makes...d'oh!
| | req.publicport = htons(publicport);
| | req.lifetime = htonl(lifetime);
| | -
| | - // Attempt to contact NAT-PMP device 9 times as per: draft-cheshire-nat-pmp-02.txt
| | - while (req_attempts < 10)
| | - {
| | +
| | + /* The NAT-PMP spec says we should attempt to contact the gateway 9 times, doubling the time we wait each time.
| | + * Even starting with a timeout of 0.1 seconds, that means that we have a total waiting of 204.6 seconds.
| | + * With the recommended timeout of 0.25 seconds, we're talking 511.5 seconds (8.5 minutes).
| | + *
| | + * This seems really silly... if this were nonblocking, a couple retries might be in order, but it's not at present.
| | + * XXX Make this nonblocking.
| | + * XXX This code looks like the pmp_get_public_ip() code. Can it be consolidated?
| | + */
| | #ifdef PMP_DEBUG
| | - purple_debug_info("nat-pmp", "Attempting to create a NAT-PMP mapping the private port %d, and the public port %d\n", privateport, publicport);
| | - purple_debug_info("nat-pmp", "\tTimeout: %ds %dus, Request #: %d\n", req_timeout.tv_sec, req_timeout.tv_usec, req_attempts);
| | + purple_debug_info("nat-pmp", "Attempting to create a NAT-PMP mapping the private port %d, and the public port %d\n", privateport, publicport);
| | + purple_debug_info("nat-pmp", "\tTimeout: %ds %dus\n", req_timeout.tv_sec, req_timeout.tv_usec);
| | #endif
| |
| | - if (sendto(sendfd, &req, sizeof(req), 0, (struct sockaddr *)(gateway), sizeof(struct sockaddr)) < 0)
| | - {
| | - purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP mapping request! (%s)\n", strerror(errno));
| | - return NULL;
| | - }
| | -
| | - if (setsockopt(sendfd, SOL_SOCKET, SO_RCVTIMEO, &req_timeout, sizeof(req_timeout)) < 0)
| | - {
| | + /* TODO: Non-blocking! */
| | + success = (sendto(sendfd, &req, sizeof(req), 0, (struct sockaddr *)(gateway), sizeof(struct sockaddr)) >= 0);
| | + if (!success)
| | + purple_debug_info("nat-pmp", "There was an error sending the NAT-PMP mapping request! (%s)\n", strerror(errno));
| | +
| | + if (success)
| | + {
| | + success = (setsockopt(sendfd, SOL_SOCKET, SO_RCVTIMEO, &req_timeout, sizeof(req_timeout)) >= 0);
| | + if (!success)
| | purple_debug_info("nat-pmp", "There was an error setting the socket's options! (%s)\n", strerror(errno));
| | - return NULL;
| | - }
| | -
| | - if (recvfrom(sendfd, resp, sizeof(pmp_map_response_t), 0, NULL, NULL) < 0)
| | - {
| | - if ( (errno != EAGAIN) || (req_attempts == 9) )
| | - {
| | - purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", strerror(errno));
| | - return NULL;
| | - }
| | - else
| | - {
| | - goto iterate;
| | - }
| | - }
| | -
| | - if (resp->opcode != (req.opcode + 128))
| | - {
| | + }
| | +
| | + if (success)
| | + {
| | + /* The original code treats EAGAIN as a reason to iterate.. but I've removed iteration. This may be a problem */
| | + /* TODO: Non-blocking! */
| | + success = ((recvfrom(sendfd, resp, sizeof(PurplePmpMapResponse), 0, NULL, NULL) >= 0) ||
| | + (errno == EAGAIN));
| | + if (!success)
| | + purple_debug_info("nat-pmp", "There was an error receiving the response from the NAT-PMP device! (%s)\n", strerror(errno));
| | + }
| | +
| | + if (success)
| | + {
| | + success = (resp->opcode == (req.opcode + 128));
| | + if (!success)
| | purple_debug_info("nat-pmp", "The opcode for the response from the NAT device does not match the request opcode!\n");
| | - goto iterate;
| | - }
| | -
| | - break;
| | -
| | -iterate:
| | - ++req_attempts;
| | - double_timeout(&req_timeout);
| | }
| | -
| | +
| | #ifdef PMP_DEBUG
| | - purple_debug_info("nat-pmp", "Response received from NAT-PMP device:\n");
| | - purple_debug_info("nat-pmp", "version: %d\n", resp->version);
| | - purple_debug_info("nat-pmp", "opcode: %d\n", resp->opcode);
| | - purple_debug_info("nat-pmp", "resultcode: %d\n", ntohs(resp->resultcode));
| | - purple_debug_info("nat-pmp", "epoch: %d\n", ntohl(resp->epoch));
| | - purple_debug_info("nat-pmp", "privateport: %d\n", ntohs(resp->privateport));
| | - purple_debug_info("nat-pmp", "publicport: %d\n", ntohs(resp->publicport));
| | - purple_debug_info("nat-pmp", "lifetime: %d\n", ntohl(resp->lifetime));
| | -#endif
| | + if (success)
| | + {
| | + purple_debug_info("nat-pmp", "Response received from NAT-PMP device:\n");
| | + purple_debug_info("nat-pmp", "version: %d\n", resp->version);
| | + purple_debug_info("nat-pmp", "opcode: %d\n", resp->opcode);
| | + purple_debug_info("nat-pmp", "resultcode: %d\n", ntohs(resp->resultcode));
| | + purple_debug_info("nat-pmp", "epoch: %d\n", ntohl(resp->epoch));
| | + purple_debug_info("nat-pmp", "privateport: %d\n", ntohs(resp->privateport));
| | + purple_debug_info("nat-pmp", "publicport: %d\n", ntohs(resp->publicport));
| | + purple_debug_info("nat-pmp", "lifetime: %d\n", ntohl(resp->lifetime));
| | + }
| | +#endif
| |
| | + g_free(resp);
| | g_free(gateway);
| |
| | - return resp;
| | + /* XXX The private port may actually differ from the one we requested, according to the spec.
| | + * We don't handle that situation at present.
| | + *
| | + * TODO: Look at the result and verify it matches what we wanted; either return a failure if it doesn't,
| | + * or change network.c to know what to do if the desired private port shifts as a result of the nat-pmp operation.
| | + */
| | + return success;
| | }
| |
| | -/*!
| | - * pmp_destroy_map(uint8_t,uint16_t)
| | - * will return NULL on error, or a pointer to the pmp_map_response_t type
| | - */
| | -pmp_map_response_t *
| | -purple_pmp_destroy_map(PurplePmpType type, uint16_t privateport)
| | +gboolean
| | +purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport)
| | {
| | - pmp_map_response_t *response;
| | -
| | - response = purple_pmp_create_map(((type == PURPLE_PMP_TYPE_UDP) ? PMP_MAP_OPCODE_UDP : PMP_MAP_OPCODE_TCP),
| | + gboolean success;
| | +
| | + success = purple_pmp_create_map(((type == PURPLE_PMP_TYPE_UDP) ? PMP_MAP_OPCODE_UDP : PMP_MAP_OPCODE_TCP),
| | privateport, 0, 0);
| | - if (!response)
| | - {
| | - purple_debug_info("nat-pmp", "Failed to properly destroy mapping for %d!\n", privateport);
| | - return NULL;
| | - }
| | - else
| | - {
| | - return response;
| | - }
| | + if (!success)
| | + purple_debug_warning("nat-pmp", "Failed to properly destroy mapping for %d!\n", privateport);
| | +
| | + return success;
| | }
| | #else /* #ifdef NET_RT_DUMP2 */
| | char *
| | @@ -460,15 +465,15 @@ purple_pmp_get_public_ip()
| | return NULL;
| | }
| |
| | -pmp_map_response_t *
| | -purple_pmp_create_map(PurplePmpType type, uint16_t privateport, uint16_t publicport, uint32_t lifetime)
| | +gboolean
| | +purple_pmp_create_map(PurplePmpType type, unsigned short privateport, unsigned short publicport, int lifetime)
| | {
| | - return NULL;
| | + return FALSE;
| | }
| |
| | -pmp_map_response_t *
| | -purple_pmp_destroy_map(PurplePmpType type, uint16_t privateport)
| | +gboolean
| | +purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport)
| | {
| | - return NULL;
| | + return FALSE;
| | }
| | #endif /* #ifndef NET_RT_DUMP2 */
| | ============================================================
| | --- libpurple/nat-pmp.h fde05a571347c5fd3ae9975f2ad0fbe908e10fa2
| | +++ libpurple/nat-pmp.h 5f2cac238513429f0a46ff2bcf9374b5f61270c3
| | @@ -1,5 +1,5 @@
| | /**
| | -* @file nat-pmp.h NAT-PMP Implementation
| | + * @file nat-pmp.h NAT-PMP Implementation
| | * @ingroup core
| | *
| | * purple
| | @@ -28,20 +28,13 @@
| | * OF SUCH DAMAGE.
| | */
| |
| | -#ifndef _PMPMAPPER_H
| | -#define _PMPMAPPER_H
| | +#ifndef _PURPLE_NAT_PMP_H
| | +#define _PURPLE_NAT_PMP_H
| |
| | -#include <stdio.h>
| | -#include <stdlib.h>
| | -#include <errno.h>
| | -#include <assert.h>
| | -#include <sys/socket.h>
| | -#include <sys/sysctl.h>
| | -#include <sys/types.h>
| | -#include <net/if.h>
| | -#include <net/route.h>
| | +#include <stdint.h>
| | +#include <glib.h>
| |
| | -#define PURPLE_PMP_LIFETIME 3600 // 3600 seconds
| | +#define PURPLE_PMP_LIFETIME 3600 /* 3600 seconds */
| |
| | /*
| | * uint8_t: version, opcodes
| | @@ -54,40 +47,37 @@ typedef enum {
| | PURPLE_PMP_TYPE_TCP
| | } PurplePmpType;
| |
| | -typedef struct {
| | - uint8_t version;
| | - uint8_t opcode;
| | -} pmp_ip_request_t;
| | +/**
| | + *
| | + */
| |
| | -typedef struct {
| | - uint8_t version;
| | - uint8_t opcode; // 128 + n
| | - uint16_t resultcode;
| | - uint32_t epoch;
| | - uint32_t address;
| | -} pmp_ip_response_t;
| | +/*
| | + * TODO: This should probably cache the result of this lookup requests
| | + * so that subsequent calls to this function do not require a
| | + * round-trip exchange with the local router.
| | + */
| | +char *purple_pmp_get_public_ip();
| |
| | -typedef struct {
| | - uint8_t version;
| | - uint8_t opcode;
| | - char reserved[2];
| | - uint16_t privateport;
| | - uint16_t publicport;
| | - uint32_t lifetime;
| | -} pmp_map_request_t;
| | +/**
| | + * Remove the NAT-PMP mapping for a specified type on a specified port
| | + *
| | + * @param type The PurplePmpType
| | + * @param privateport The private port on which we are listening locally
| | + * @param publicport The public port on which we are expecting a response
| | + * @param lifetime The lifetime of the mapping. It is recommended that this be PURPLE_PMP_LIFETIME.
| | + *
| | + * @returns TRUE if succesful; FALSE if unsuccessful
| | + */
| | +gboolean purple_pmp_create_map(PurplePmpType type, unsigned short privateport, unsigned short publicport, int lifetime);
| |
| | -typedef struct {
| | - uint8_t version;
| | - uint8_t opcode;
| | - uint16_t resultcode;
| | - uint32_t epoch;
| | - uint16_t privateport;
| | - uint16_t publicport;
| | - uint32_t lifetime;
| | -} pmp_map_response_t;
| | -
| | -char *purple_pmp_get_public_ip();
| | -pmp_map_response_t *purple_pmp_create_map(PurplePmpType type, uint16_t privateport, uint16_t publicport, uint32_t lifetime);
| | -pmp_map_response_t *purple_pmp_destroy_map(PurplePmpType type, uint16_t privateport);
| | +/**
| | + * Remove the NAT-PMP mapping for a specified type on a specified port
| | + *
| | + * @param type The PurplePmpType
| | + * @param privateport The private port on which the mapping was previously made
| | + *
| | + * @returns TRUE if succesful; FALSE if unsuccessful
| | + */
| | +gboolean purple_pmp_destroy_map(PurplePmpType type, unsigned short privateport);
| |
| | #endif
| | ============================================================
| | --- libpurple/network.c f4abab72cf68a07f04246d6c244420ca5ab42363
| | +++ libpurple/network.c 769d07016c6a436271d7ed695e6d43c01206cb45
| | @@ -47,7 +47,7 @@
| | #include "stun.h"
| | #include "upnp.h"
| |
| | -/* #define ENABLE_NAT_PMP */
| | +/* #define ENABLE_NAT_PMP 1 */
| |
| | #ifdef ENABLE_NAT_PMP
| | #include "nat-pmp.h"
| | @@ -199,7 +199,7 @@ purple_network_get_my_ip(int fd)
| | return ip;
| |
| | #ifdef ENABLE_NAT_PMP
| | - /* Attempt to ge tthe IP from a NAT device using NAT-PMP */
| | + /* Attempt to get the IP from a NAT device using NAT-PMP */
| | ip = purple_pmp_get_public_ip();
| | if (ip != NULL)
| | return ip;
| | @@ -250,13 +250,14 @@ purple_network_set_upnp_port_mapping_cb(
| | purple_network_listen_cancel(listen_data);
| | }
| |
| | +#ifdef ENABLE_NAT_PMP
| | static gboolean
| | purple_network_finish_pmp_map_cb(gpointer data)
| | {
| | PurpleNetworkListenData *listen_data;
| | -
| | +
| | listen_data = data;
| | -
| | +
| | if (listen_data->cb)
| | listen_data->cb(listen_data->listenfd, listen_data->cb_data);
| |
| | @@ -264,6 +265,7 @@ purple_network_finish_pmp_map_cb(gpointe
| |
| | return FALSE;
| | }
| | +#endif
| |
| | static PurpleNetworkListenData *
| | purple_network_do_listen(unsigned short port, int socket_type, PurpleNetworkListenCallback cb, gpointer cb_data)
| | @@ -351,7 +353,7 @@ purple_network_do_listen(unsigned short
| | actual_port = purple_network_get_port_from_fd(listenfd);
| |
| | purple_debug_info("network", "Listening on port: %hu\n", actual_port);
| | -
| | +
| | listen_data = g_new0(PurpleNetworkListenData, 1);
| | listen_data->listenfd = listenfd;
| | listen_data->adding = TRUE;
| | ============================================================
| | --- libpurple/plugin.c 9a9b7a2e92b37717cb12a5a00947e99d0855f261
| | +++ libpurple/plugin.c 6116d030f8485eabea8e4ad1a66ae7d2b9ee20c3
| | @@ -369,12 +369,12 @@ purple_plugin_probe(const char *filename
| | return plugin;
| | }
| |
| | - /*
| | - * Check to make sure a plugin has defined an id.
| | - * Not having this check caused purple_plugin_unload to
| | - * enter an infinite loop in certain situations by passing
| | - * purple_find_plugin_by_id a NULL value. -- ecoffey
| | - */
| | + /*
| | + * Check to make sure a plugin has defined an id.
| | + * Not having this check caused purple_plugin_unload to
| | + * enter an infinite loop in certain situations by passing
| | + * purple_find_plugin_by_id a NULL value. -- ecoffey
| | + */
| | if (plugin->info->id == NULL || *plugin->info->id == '\0')
| | {
| | plugin->error = g_strdup_printf(_("This plugin has not defined an ID."));
| | @@ -672,12 +672,10 @@ purple_plugin_unload(PurplePlugin *plugi
| | {
| | if (!purple_plugin_unload(dep_plugin))
| | {
| | - char *translated_name = g_strdup(_(dep_plugin->info->name));
| | char *tmp;
| |
| | tmp = g_strdup_printf(_("The dependent plugin %s failed to unload."),
| | - translated_name);
| | - g_free(translated_name);
| | + _(dep_plugin->info->name));
| |
| | purple_notify_error(NULL, NULL,
| | _("There were errors unloading the plugin."), tmp);
| | ============================================================
| | --- libpurple/plugins/Makefile.am 8f2c8fa3826c7c8e797405d1fb4d137b4414b29c
| | +++ libpurple/plugins/Makefile.am ed3c8486e48d7ae2910ab718049d38fa37da8cbc
| | @@ -100,10 +100,10 @@ EXTRA_DIST = \
| |
| | EXTRA_DIST = \
| | Makefile.mingw \
| | + ciphertest.c \
| | dbus-buddyicons-example.py \
| | filectl.c \
| | fortuneprofile.pl \
| | - gaim.pl \
| | ipc-test-client.c \
| | ipc-test-server.c \
| | pluginpref_example.c \
| | ============================================================
| | --- libpurple/prefs.c 1d5038ed5718b75d22cae01a2380000bd732df24
| | +++ libpurple/prefs.c d392676033266691ad0c60ee1ab6aa0b7d1d080b
| | @@ -87,9 +87,9 @@ purple_pref *find_pref(const char *name)
| | static struct
| | purple_pref *find_pref(const char *name)
| | {
| | - if (!name || name[0] != '/')
| | - return NULL;
| | - else if (name[1] == '\0')
| | + g_return_val_if_fail(name != NULL && name[0] == '/', NULL);
| | +
| | + if (name[1] == '\0')
| | return &prefs;
| | else
| | return g_hash_table_lookup(prefs_hash, name);
| | ============================================================
| | --- libpurple/protocols/bonjour/bonjour.c c6c146a8bc1d5da209c8c5841402cbf7aff6fea1
| | +++ libpurple/protocols/bonjour/bonjour.c a345c390a97ff0719faf1e1240d787d2a84a0691
| | @@ -58,7 +58,7 @@ bonjour_removeallfromlocal(PurpleConnect
| | {
| | PurpleAccount *account = purple_connection_get_account(gc);
| | PurpleBuddyList *blist;
| | - PurpleBlistNode *gnode, *cnode, *bnode;
| | + PurpleBlistNode *gnode, *cnode, *cnodenext, *bnode, *bnodenext;
| | PurpleBuddy *buddy;
| |
| | blist = purple_get_blist();
| | @@ -70,12 +70,14 @@ bonjour_removeallfromlocal(PurpleConnect
| | {
| | if (!PURPLE_BLIST_NODE_IS_GROUP(gnode))
| | continue;
| | - for (cnode = gnode->child; cnode; cnode = cnode->next)
| | + for (cnode = gnode->child; cnode; cnode = cnodenext)
| | {
| | + cnodenext = cnode->next;
| | if (!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
| | continue;
| | - for (bnode = cnode->child; bnode; bnode = bnode->next)
| | + for (bnode = cnode->child; bnode; bnode = bnodenext)
| | {
| | + bnodenext = bnode->next;
| | if (!PURPLE_BLIST_NODE_IS_BUDDY(bnode))
| | continue;
| | buddy = (PurpleBuddy *)bnode;
| | ============================================================
| | --- libpurple/protocols/jabber/auth.c d7da634da64e650c1e13347dfe4bbd519df0c94f
| | +++ libpurple/protocols/jabber/auth.c b28490f91e953997bf6c7ed054cdc92967ed7e7c
| | @@ -20,18 +20,20 @@
| | */
| | #include "internal.h"
| |
| | +#include "account.h"
| | +#include "debug.h"
| | +#include "cipher.h"
| | +#include "conversation.h"
| | +#include "request.h"
| | +#include "sslconn.h"
| | +#include "util.h"
| | +#include "xmlnode.h"
| | +
| | #include "jutil.h"
| | #include "auth.h"
| | -#include "xmlnode.h"
| | #include "jabber.h"
| | #include "iq.h"
| |
| | -#include "debug.h"
| | -#include "util.h"
| | -#include "cipher.h"
| | -#include "sslconn.h"
| | -#include "request.h"
| | -
| | static void auth_old_result_cb(JabberStream *js, xmlnode *packet,
| | gpointer data);
| |
| | ============================================================
| | --- libpurple/protocols/jabber/jabber.c 3ef19ac71fa058baca546defbc3a3bf882a5bc0b
| | +++ libpurple/protocols/jabber/jabber.c 216a72386e4662a131d14dadc3108d12edbb286a
| | @@ -25,6 +25,7 @@
| | #include "blist.h"
| | #include "cmds.h"
| | #include "connection.h"
| | +#include "conversation.h"
| | #include "debug.h"
| | #include "dnssrv.h"
| | #include "message.h"
| | @@ -36,6 +37,7 @@
| | #include "server.h"
| | #include "util.h"
| | #include "version.h"
| | +#include "xmlnode.h"
| |
| | #include "auth.h"
| | #include "buddy.h"
| | @@ -169,12 +171,16 @@ void jabber_process_packet(JabberStream
| |
| | void jabber_process_packet(JabberStream *js, xmlnode *packet)
| | {
| | + const char *xmlns;
| | +
| | purple_signal_emit(my_protocol, "jabber-receiving-xmlnode", js->gc, &packet);
| |
| | /* if the signal leaves us with a null packet, we're done */
| | if(NULL == packet)
| | return;
| |
| | + xmlns = xmlnode_get_namespace(packet);
| | +
| | if(!strcmp(packet->name, "iq")) {
| | jabber_iq_parse(js, packet);
| | } else if(!strcmp(packet->name, "presence")) {
| | @@ -183,14 +189,14 @@ void jabber_process_packet(JabberStream
| | jabber_message_parse(js, packet);
| | } else if(!strcmp(packet->name, "stream:features")) {
| | jabber_stream_features_parse(js, packet);
| | - } else if (!strcmp(packet->name, "features") &&
| | - !strcmp(xmlnode_get_namespace(packet), "http://etherx.jabber.org/streams")) {
| | + } else if (!strcmp(packet->name, "features") &&
| | + !strcmp(xmlns, "http://etherx.jabber.org/streams")) {
| | jabber_stream_features_parse(js, packet);
| | - } else if(!strcmp(packet->name, "stream:error")) {
| | + } else if(!strcmp(packet->name, "stream:error") ||
| | + (!strcmp(packet->name, "error") &&
| | + !strcmp(xmlns, "http://etherx.jabber.org/streams")))
| | + {
| | jabber_stream_handle_error(js, packet);
| | - } else if (!strcmp(packet->name, "error") &&
| | - !strcmp(xmlnode_get_namespace(packet), "http://etherx.jabber.org/streams")) {
| | - jabber_stream_handle_error(js, packet);
| | } else if(!strcmp(packet->name, "challenge")) {
| | if(js->state == JABBER_STREAM_AUTHENTICATING)
| | jabber_auth_handle_challenge(js, packet);
| | @@ -1526,7 +1532,9 @@ char *jabber_parse_error(JabberStream *j
| | js->gc->wants_to_die = TRUE;
| | text = _("Authentication Failure");
| | }
| | - } else if(!strcmp(packet->name, "stream:error")) {
| | + } else if(!strcmp(packet->name, "stream:error") ||
| | + (!strcmp(packet->name, "error") &&
| | + !strcmp(xmlns, "http://etherx.jabber.org/streams"))) {
| | if(xmlnode_get_child(packet, "bad-format")) {
| | text = _("Bad Format");
| | } else if(xmlnode_get_child(packet, "bad-namespace-prefix")) {
| | ============================================================
| | --- libpurple/protocols/jabber/jutil.c 1d344c7e97dcd21954733bd7571a8de3fbbf5877
| | +++ libpurple/protocols/jabber/jutil.c 3569846a7d2dfc3ed4e396587f152d547cf231fa
| | @@ -19,8 +19,11 @@
| | *
| | */
| | #include "internal.h"
| | +#include "account.h"
| | +#include "conversation.h"
| | #include "server.h"
| | #include "util.h"
| | +#include "xmlnode.h"
| |
| | #include "chat.h"
| | #include "presence.h"
| | ============================================================
| | --- libpurple/protocols/jabber/jutil.h f55a65b157435cefb2dc5fc47af51b3f0f64c8f6
| | +++ libpurple/protocols/jabber/jutil.h 76147b456f1ea49fa54065f372ffe921f9f55643
| | @@ -22,11 +22,6 @@
| | #ifndef _PURPLE_JABBER_JUTIL_H_
| | #define _PURPLE_JABBER_JUTIL_H_
| |
| | -#include "account.h"
| | -#include "conversation.h"
| | -#include "xmlnode.h"
| | -
| | -
| | typedef struct _JabberID {
| | char *node;
| | char *domain;
| | ============================================================
| | --- libpurple/protocols/jabber/message.c 53023e5c4606652ab086b4add180a88e51f10dda
| | +++ libpurple/protocols/jabber/message.c a716b063289753b851a467985a1063ff3742664a
| | @@ -33,7 +33,7 @@ void jabber_message_free(JabberMessage *
| |
| | void jabber_message_free(JabberMessage *jm)
| | {
| | - g_free(jm->from);
| | + g_free(jm->from);
| | g_free(jm->to);
| | g_free(jm->id);
| | g_free(jm->subject);
| | ============================================================
| | --- libpurple/protocols/jabber/presence.c 20a70bc27ab344ab21b2ff8d0ebdafb81494d23b
| | +++ libpurple/protocols/jabber/presence.c a9483d678d25780d0bc875a2fe8969773ba96a95
| | @@ -20,20 +20,22 @@
| | */
| | #include "internal.h"
| |
| | +#include "account.h"
| | #include "cipher.h"
| | +#include "conversation.h"
| | #include "debug.h"
| | #include "notify.h"
| | #include "request.h"
| | #include "server.h"
| | #include "status.h"
| | #include "util.h"
| | +#include "xmlnode.h"
| |
| | #include "buddy.h"
| | #include "chat.h"
| | #include "presence.h"
| | #include "iq.h"
| | #include "jutil.h"
| | -#include "xmlnode.h"
| |
| |
| | static void chats_send_presence_foreach(gpointer key, gpointer val,
| | ============================================================
| | --- libpurple/protocols/oscar/oscar_data.c f9feb20079aabe956491f9f5b1a2220b3f0c1de0
| | +++ libpurple/protocols/oscar/oscar_data.c be535a60ad5b894fbc6de98f4d3e3e593656d22e
| | @@ -53,14 +53,14 @@ oscar_data_new(void)
| | aim__registermodule(od, locate_modfirst);
| | aim__registermodule(od, buddylist_modfirst);
| | aim__registermodule(od, msg_modfirst);
| | - aim__registermodule(od, adverts_modfirst);
| | - aim__registermodule(od, invite_modfirst);
| | + /* aim__registermodule(od, adverts_modfirst); */
| | + /* aim__registermodule(od, invite_modfirst); */
| | aim__registermodule(od, admin_modfirst);
| | aim__registermodule(od, popups_modfirst);
| | aim__registermodule(od, bos_modfirst);
| | aim__registermodule(od, search_modfirst);
| | aim__registermodule(od, stats_modfirst);
| | - aim__registermodule(od, translate_modfirst);
| | + /* aim__registermodule(od, translate_modfirst); */
| | aim__registermodule(od, chatnav_modfirst);
| | aim__registermodule(od, chat_modfirst);
| | aim__registermodule(od, odir_modfirst);
| | ============================================================
| | --- libpurple/protocols/oscar/peer.h 15f9870615b75b0e4ad029d9b230a3e2678e27fc
| | +++ libpurple/protocols/oscar/peer.h 5af6a3ed0c92bf10c6b8d3425ea1ccb17ef43e36
| | @@ -278,15 +278,4 @@ void peer_proxy_connection_established_c
| | */
| | void peer_proxy_connection_established_cb(gpointer data, gint source, const gchar *error_message);
| |
| | -#if 0
| | -int peer_oft_sendheader(OscarData *od, guint16 type, PeerConnection *peer_connection);
| | -guint32 peer_oft_checksum_chunk(const guint8 *buffer, int bufferlen, guint32 prevcheck);
| | -guint32 peer_oft_checksum_file(char *filename);
| | -int peer_oft_sendheader(OscarData *od, guint16 type, PeerConnection *peer_connection);
| | -PeerConnection *peer_oft_createinfo(OscarData *od, const guchar *cookie, const char *sn,
| | - const char *ip, guint16 port, guint32 size, guint32 modtime, char *filename, int send_or_recv,
| | - int method, int stage);
| | -int peer_oft_destroyinfo(PeerConnection *peer_connection);
| | -#endif
| | -
| | #endif /* _PEER_H_ */
| | ============================================================
| | --- libpurple/protocols/yahoo/yahoo_packet.c 859a90a09071025a0a5ea854c4814bfb0dfbed1d
| | +++ libpurple/protocols/yahoo/yahoo_packet.c 0717a54568f1c17317522aa9b0f44a5434a2e116
| | @@ -161,6 +161,7 @@ void yahoo_packet_read(struct yahoo_pack
| | }
| |
| | if (accept) {
| | + /* TODO: strstr() should not be used here because data isn't NULL terminated */
| | delimiter = (const guchar *)strstr((char *)&data[pos], "\xc0\x80");
| | if (delimiter == NULL)
| | {
| | ============================================================
| | --- libpurple/tests/test_jabber_jutil.c 6c3369e8e2c067337c81ecfcdfd592b0f6051499
| | +++ libpurple/tests/test_jabber_jutil.c 358a91160795b2df7719b7202fd837c5d0b28d61
| | @@ -1,6 +1,9 @@
| | #include <string.h>
| |
| | #include "tests.h"
| | +#include "../account.h"
| | +#include "../conversation.h"
| | +#include "../xmlnode.h"
| | #include "../protocols/jabber/jutil.h"
| |
| | START_TEST(test_get_resource)
| | ============================================================
| | --- libpurple/util.c 1e09f998fd7b5a2d39664f62a0c9405d83a3c898
| | +++ libpurple/util.c cf4f13c6c87871f8436bafe3b7473f30ca09ce6e
| | @@ -2184,8 +2184,8 @@ purple_home_dir(void)
| | #endif
| | }
| |
| | -/* returns a string of the form ~/.purple, where ~ is replaced by the user's home
| | - * dir. Note that there is no trailing slash after .purple. */
| | +/* returns a string of the form ~/.gaim, where ~ is replaced by the user's home
| | + * dir. Note that there is no trailing slash after .gaim. */
| | const char *
| | purple_user_dir(void)
| | {
| | @@ -2196,7 +2196,7 @@ purple_user_dir(void)
| |
| | if (hd) {
| | g_strlcpy((char*) &home_dir, hd, sizeof(home_dir));
| | - g_strlcat((char*) &home_dir, G_DIR_SEPARATOR_S ".purple",
| | + g_strlcat((char*) &home_dir, G_DIR_SEPARATOR_S ".gaim",
| | sizeof(home_dir));
| | }
| | }
| | ============================================================
| | --- libpurple/xmlnode.c 0d311b8a651fde5d754e47a6b55351da76093197
| | +++ libpurple/xmlnode.c be87af120bf9ce453221a4f563982650c49f7762
| | @@ -27,6 +27,7 @@
| | * write my own stuff. Also, re-writing this lets me be as lightweight
| | * as I want to be. Thank you libxode for giving me a good starting point */
| |
| | +#include "debug.h"
| | #include "internal.h"
| |
| | #include <libxml/parser.h>
| | ============================================================
| | --- m4macros/Makefile.am cef7b6a5b3e78aca861a2a3b61f1eb98140bf127
| | +++ m4macros/Makefile.am 6843f9b327fb0c246ace5dd19d2d6c1a2b7180f8
| | @@ -1,4 +1,4 @@
| | -installed_m4=gaim.m4
| | +installed_m4=purple.m4
| |
| | EXTRA_DIST=$(installed_m4)
| |
| | ============================================================
| | --- m4macros/gaim.m4 ef32b45c4c5f0ae31a1185463bdd50f82cec4791
| | +++ m4macros/purple.m4 45b3551482f08118e334eaa86d8c896f448149c5
| | @@ -1,56 +1,56 @@ dnl ####################################
| | dnl ###########################################################################
| | -dnl # Configure paths for Gaim
| | +dnl # Configure paths for libpurple
| | dnl # Gary Kramlich 2005
| | dnl #
| | dnl # Based off of glib-2.0.m4 by Owen Taylor
| | dnl ###########################################################################
| |
| | dnl ###########################################################################
| | -dnl # AM_PATH_GAIM([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
| | +dnl # AM_PATH_PURPLE([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
| | dnl #
| | -dnl # Test for gaim and define GAIM_CFLAGS, GAIM_LIBS, GAIM_DATADIR, and
| | -dnl # GAIM_LIBDIR
| | +dnl # Test for purple and define PURPLE_CFLAGS, PURPLE_LIBS, PURPLE_DATADIR, and
| | +dnl # PURPLE_LIBDIR
| | dnl ###########################################################################
| | -AC_DEFUN([AM_PATH_GAIM],
| | +AC_DEFUN([AM_PATH_PURPLE],
| | [dnl
| | AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
| |
| | - no_gaim=""
| | + no_purple=""
| |
| | if test x"$PKG_CONFIG" != x"no" ; then
| | if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
| | :
| | else
| | echo "*** pkg-config is too old; version 0.7 or newer is required."
| | - no_gaim="yes"
| | + no_purple="yes"
| | PKG_CONFIG="no"
| | fi
| | else
| | - no_gaim="yes"
| | + no_purple="yes"
| | fi
| |
| | min_version=ifelse([$1], ,2.0.0,$1)
| | found_version=""
| | -
| | - AC_MSG_CHECKING(for gaim - version >= $min_version)
| |
| | - if test x"$no_gaim" = x"" ; then
| | - GAIM_DATADIR=`$PKG_CONFIG --variable=datadir gaim`
| | - GAIM_LIBDIR=`$PKG_CONFIG --variable=libdir gaim`
| | + AC_MSG_CHECKING(for purple - version >= $min_version)
| |
| | - GAIM_CFLAGS=`$PKG_CONFIG --cflags gaim`
| | - GAIM_LIBS=`$PKG_CONFIG --libs gaim`
| | + if test x"$no_purple" = x"" ; then
| | + PURPLE_DATADIR=`$PKG_CONFIG --variable=datadir purple`
| | + PURPLE_LIBDIR=`$PKG_CONFIG --variable=libdir purple`
| |
| | - gaim_version=`$PKG_CONFIG --modversion gaim`
| | - gaim_major_version=`echo $gaim_version | cut -d. -f 1`
| | - gaim_minor_version=`echo $gaim_version | cut -d. -f 2`
| | -
| | + PURPLE_CFLAGS=`$PKG_CONFIG --cflags purple`
| | + PURPLE_LIBS=`$PKG_CONFIG --libs purple`
| | +
| | + purple_version=`$PKG_CONFIG --modversion purple`
| | + purple_major_version=`echo $purple_version | cut -d. -f 1`
| | + purple_minor_version=`echo $purple_version | cut -d. -f 2`
| | +
| | dnl # stash the micro version in a temp variable. Then stash
| | - dnl # the numeric for it in gaim_micro_version and anything
| | - dnl # else in gaim_extra_version.
| | - gaim_micro_version_temp=`echo $gaim_version | cut -d. -f 3`
| | - gaim_micro_version=`echo $gaim_micro_version_temp | sed 's/[[^0-9]]//g'`
| | - gaim_extra_version=`echo $gaim_micro_version_temp | sed 's/[[0-9]]//g'`
| | + dnl # the numeric for it in purple_micro_version and anything
| | + dnl # else in purple_extra_version.
| | + purple_micro_version_temp=`echo $purple_version | cut -d. -f 3`
| | + purple_micro_version=`echo $purple_micro_version_temp | sed 's/[[^0-9]]//g'`
| | + purple_extra_version=`echo $purple_micro_version_temp | sed 's/[[0-9]]//g'`
| |
| | dnl # get the major, minor, and macro that the user gave us
| | min_major_version=`echo $min_version | cut -d. -f 1`
| | @@ -58,21 +58,21 @@ AC_DEFUN([AM_PATH_GAIM],
| | min_micro_version=`echo $min_version | cut -d. -f 3`
| |
| | dnl # check the users version against the version from pkg-config
| | - if test $gaim_major_version -eq $min_major_version -a \
| | - $gaim_minor_version -ge $min_minor_version -a \
| | - $gaim_micro_version -ge $min_micro_version
| | + if test $purple_major_version -eq $min_major_version -a \
| | + $purple_minor_version -ge $min_minor_version -a \
| | + $purple_micro_version -ge $min_micro_version
| | then
| | :
| | else
| | - no_gaim="yes"
| | - found_version="$gaim_major_version.$gaim_minor_version.$gaim_micro_version$gaim_extra_version"
| | + no_purple="yes"
| | + found_version="$purple_major_version.$purple_minor_version.$purple_micro_version$purple_extra_version"
| | fi
| |
| | dnl # Do we want a compile test here?
| | fi
| |
| | - if test x"$no_gaim" = x"" ; then
| | - AC_MSG_RESULT(yes (version $gaim_major_version.$gaim_minor_version.$gaim_micro_version$gaim_extra_version))
| | + if test x"$no_purple" = x"" ; then
| | + AC_MSG_RESULT(yes (version $purple_major_version.$purple_minor_version.$purple_micro_version$purple_extra_version))
| | ifelse([$2], , :, [$2])
| | else
| | AC_MSG_RESULT(no)
| | @@ -82,21 +82,21 @@ AC_DEFUN([AM_PATH_GAIM],
| | fi
| |
| | if test x"found_version" != x"" ; then
| | - echo "*** A new enough version of gaim was not found."
| | + echo "*** A new enough version of purple was not found."
| | echo "*** You have version $found_version"
| | - echo "*** See http://gaim.sf.net/"
| | + echo "*** See http://pidgin.im/"
| | fi
| | -
| | - GAIM_CFLAGS=""
| | - GAIM_LIBS=""
| | - GAIM_DATADIR=""
| | - GAIM_LIBDIR=""
| |
| | + PURPLE_CFLAGS=""
| | + PURPLE_LIBS=""
| | + PURPLE_DATADIR=""
| | + PURPLE_LIBDIR=""
| | +
| | ifelse([$3], , :, [$3])
| | fi
| |
| | - AC_SUBST(GAIM_CFLAGS)
| | - AC_SUBST(GAIM_LIBS)
| | - AC_SUBST(GAIM_DATADIR)
| | - AC_SUBST(GAIM_LIBDIR)
| | + AC_SUBST(PURPLE_CFLAGS)
| | + AC_SUBST(PURPLE_LIBS)
| | + AC_SUBST(PURPLE_DATADIR)
| | + AC_SUBST(PURPLE_LIBDIR)
| | ])
| | ============================================================
| | --- pidgin/gtkblist.c 701cf65517da75cedf0ea9cd72de5de9987e0196
| | +++ pidgin/gtkblist.c 8b531b6d853dbcfddc7df5ef4cc985834e2f6dab
| | @@ -2279,6 +2279,7 @@ static struct tooltip_data * create_tip_
| | else
| | tmp = g_markup_escape_text(purple_chat_get_name((PurpleChat*)node), -1);
| | node_name = g_strdup_printf("<span size='x-large' weight='bold'>%s</span>", tmp);
| | + g_free(tmp);
| |
| | pango_layout_set_markup(td->layout, tooltip_text, -1);
| | pango_layout_set_wrap(td->layout, PANGO_WRAP_WORD);
| | ============================================================
| | --- pidgin/pixmaps/Makefile.am f338ef2b2f999d6cf871e614df503ee220d745d7
| | +++ pidgin/pixmaps/Makefile.am a5ab5db80ca5012d4046547a3a8eeb988e2a1731
| | @@ -9,7 +9,7 @@ EXTRA_DIST = \
| | connect.png \
| | edit.png \
| | pidgin.png \
| | - gaim.svg \
| | + pidgin.svg \
| | info.png \
| | insert-image.png \
| | insert-image-small.png \
| | @@ -48,7 +48,7 @@ EXTRA_DIST = \
| | typing.png \
| | window-icon.png \
| | Makefile.mingw \
| | - gaim.ico
| | + pidgin.ico
| |
| |
| | pidginbuttonpixdir = $(datadir)/pixmaps/pidgin/buttons
| | @@ -62,5 +62,4 @@ distpixmapdir = $(datadir)/pixmaps
| |
| |
| | distpixmapdir = $(datadir)/pixmaps
| | +distpixmap_DATA = pidgin.png pidgin.svg
| | -distpixmap_DATA = pidgin.png gaim.svg
| | -
| | ============================================================
| | --- pidgin/pixmaps/emotes/default/22/theme 322a42204340f1034912885099db998ddab45eb8
| | +++ pidgin/pixmaps/emotes/default/22/theme 2c027d0f30ce0b2fe864566b17213d63f7ac07e1
| | @@ -234,7 +234,7 @@ rose.png @};-
| | cowboy.png <):)
| | dance.png \\:D/ \\:d/
| | rose.png @};-
| | -don't-know.png :-L :-l
| | +dont-know.png :-L :-l
| | ghost.png 8-X 8-x
| | hug-left.png >:D< >:d<
| | hypnotized.png @-)
| | ============================================================
| | --- pidgin/plugins/Makefile.am 5efc78abe4ea4ac290464a9c594ada5fdae9667f
| | +++ pidgin/plugins/Makefile.am d6bb1738d28105aaf9aceacb7261bc6b7c4f4883
| | @@ -28,11 +28,11 @@ extplacement_la_LDFLAGS = -module -a
| |
| | convcolors_la_LDFLAGS = -module -avoid-version
| | extplacement_la_LDFLAGS = -module -avoid-version
| | -gaimrc_la_LDFLAGS = -module -avoid-version
| | history_la_LDFLAGS = -module -avoid-version
| | iconaway_la_LDFLAGS = -module -avoid-version
| | markerline_la_LDFLAGS = -module -avoid-version
| | notify_la_LDFLAGS = -module -avoid-version
| | +pidginrc_la_LDFLAGS = -module -avoid-version
| | relnot_la_LDFLAGS = -module -avoid-version
| | spellchk_la_LDFLAGS = -module -avoid-version
| | timestamp_la_LDFLAGS = -module -avoid-version
| | @@ -44,11 +44,11 @@ plugin_LTLIBRARIES = \
| | plugin_LTLIBRARIES = \
| | convcolors.la \
| | extplacement.la \
| | - gaimrc.la \
| | history.la \
| | iconaway.la \
| | markerline.la \
| | notify.la \
| | + pidginrc.la \
| | relnot.la \
| | spellchk.la \
| | timestamp.la \
| | @@ -57,11 +57,11 @@ extplacement_la_SOURCES = extplaceme
| |
| | convcolors_la_SOURCES = convcolors.c
| | extplacement_la_SOURCES = extplacement.c
| | -gaimrc_la_SOURCES = gaimrc.c
| | history_la_SOURCES = history.c
| | iconaway_la_SOURCES = iconaway.c
| | markerline_la_SOURCES = markerline.c
| | notify_la_SOURCES = notify.c
| | +pidginrc_la_SOURCES = pidginrc.c
| | relnot_la_SOURCES = relnot.c
| | spellchk_la_SOURCES = spellchk.c
| | timestamp_la_SOURCES = timestamp.c
| | @@ -70,11 +70,11 @@ extplacement_la_LIBADD = $(GTK_LIBS
| |
| | convcolors_la_LIBADD = $(GTK_LIBS)
| | extplacement_la_LIBADD = $(GTK_LIBS)
| | -gaimrc_la_LIBADD = $(GTK_LIBS)
| | history_la_LIBADD = $(GTK_LIBS)
| | iconaway_la_LIBADD = $(GTK_LIBS)
| | markerline_la_LIBADD = $(GTK_LIBS)
| | notify_la_LIBADD = $(GTK_LIBS)
| | +pidginrc_la_LIBADD = $(GTK_LIBS)
| | relnot_la_LIBADD = $(GLIB_LIBS)
| | spellchk_la_LIBADD = $(GTK_LIBS)
| | timestamp_la_LIBADD = $(GTK_LIBS)
| | ============================================================
| | --- pidgin/plugins/crazychat/Makefile.am 8f7c23ff9d88dc5624e584ac8137c4f7ac7a4587
| | +++ pidgin/plugins/crazychat/Makefile.am f8ae905cd5cb42de528ceced04c093ad456ff421
| | @@ -1,8 +1,8 @@
| | -plugindir = $(libdir)/gaim
| | +plugindir = $(libdir)/pidgin
| |
| | if ENABLE_DEBUG
| | DEBUG_CPPFLAGS = -g -pg
| | -# DEBUG_CPPFLAGS = -D_DEBUG_ -g -pg
| | +# DEBUG_CPPFLAGS = -D_DEBUG_ -g -pg
| | DEBUG_LFLAGS = -pg
| | else
| | DEBUG_CPPFLAGS = -O2
| | @@ -18,7 +18,7 @@ crazychat_la_LDFLAGS = -module -avoid-ve
| | endif
| |
| | crazychat_la_LDFLAGS = -module -avoid-version $(GTK_LIBS) $(DEBUG_LFLAGS)
| | -crazychat_la_SOURCES = cc_gaim_plugin.c cc_gtk_gl.c cc_gtk_gl.h \
| | +crazychat_la_SOURCES = cc_pidgin_plugin.c cc_gtk_gl.c cc_gtk_gl.h \
| | cc_interface.h crazychat.c crazychat.h util.h\
| | cc_network.c cc_network.h filter.c filter.h\
| | cc_output.c face.c face.h doggy.c doggy.h glm.h glm.c sharky.h sharky.c models.h models.c
| | @@ -31,9 +31,9 @@ crazychat_la_LIBADD = $(GTKGLEXT_LIBS)
| | #$(GTKGLEXT_CFLAGS) \
| | #-I$(top_srcdir)/include
| |
| | -AM_CPPFLAGS = -DGAIM_PLUGINS \
| | - -I$(top_srcdir)/libgaim \
| | - -I$(top_srcdir)/gtk \
| | +AM_CPPFLAGS = -DPURPLE_PLUGINS \
| | + -I$(top_srcdir)/libpurple \
| | + -I$(top_srcdir)/pidgin \
| | $(GTK_CFLAGS) \
| | $(GTKGLEXT_CFLAGS) \
| | $(DEBUG_CPPFLAGS) \
| | ============================================================
| | --- pidgin/win32/pidgin_exe_rc.rc.in 2c37d1ed01ea64c3c1db0378091700a5abb5f3c2
| | +++ pidgin/win32/pidgin_exe_rc.rc.in 17f268a082f3ab0dc040f4c803771d2f70fb6563
| | @@ -33,4 +33,4 @@ VS_VERSION_INFO VERSIONINFO
| | END
| | END
| |
| | +PURPLE_ICON ICON PIXMAPDIR "pidgin.ico"
| | -PURPLE_ICON ICON PIXMAPDIR "gaim.ico"
| | ============================================================
| | --- gaim.apspec.in 14d2f3d28104dd34a4298330ac436a8b105ca604
| | +++ pidgin.apspec.in 35cc78d87b8711314097aea3cb25f0a544ced082
| | @@ -1,11 +1,11 @@
| | # -*-shell-script-*-
| |
| | [Meta]
| | -RootName: @gaim.sourceforge.net/gaim:$SOFTWAREVERSION
| | -DisplayName: Gaim Internet Messenger
| | -ShortName: gaim
| | -Maintainer: The Gaim Developers
| | -URL: http://gaim.sourceforge.net/
| | +RootName: @pidgin.im/pidgin:$SOFTWAREVERSION
| | +DisplayName: Pidgin Internet Messenger
| | +ShortName: Pidgin
| | +Maintainer: The Pidgin Developers
| | +URL: http://pidgin.im/
| | Packager: Tim Ringenbach <marv_sf at users.sourceforge.net>
| | Summary: A GTK+ based multiprotocol instant messaging client
| | SoftwareVersion: @VERSION@
| | @@ -13,16 +13,16 @@ PackageVersion: 1
| | PackageVersion: 1
| |
| | [Description]
| | -Gaim allows you to talk to anyone using a variety of messaging protocols,
| | +Pidgin allows you to talk to anyone using a variety of messaging protocols,
| | including AIM (Oscar and TOC), ICQ, IRC, Yahoo!, MSN Messenger, Jabber,
| | Gadu-Gadu, and Zephyr. These protocols are implemented using a
| | modular, easy to use design. To use a protocol, just add an account using the
| | account editor.
| |
| | -Gaim supports many common features of other clients, as well as many unique
| | +Pidgin supports many common features of other clients, as well as many unique
| | features, such as perl scripting, TCL scripting and C plugins.
| |
| | -Gaim is NOT affiliated with or endorsed by America Online, Inc., Microsoft
| | +Pidgin is NOT affiliated with or endorsed by America Online, Inc., Microsoft
| | Corporation, Yahoo! Inc., or ICQ Inc.
| |
| | [BuildPrepare]
| | @@ -50,19 +50,19 @@ installExe ./bin/*
| | [Install]
| | # Put your installation script here
| | installExe ./bin/*
| | -installLib ./lib/libgaim-remote.so.0.0.0
| | +installLib ./lib/libpurple-remote.so.0.0.0
| | # do the plugins
| | -copyFiles ./lib/gaim "$PREFIX/lib"
| | -installMan 1 ./man/man1/gaim.1
| | -installDesktop "Networking/Instant Messaging" ./share/applications/gaim.desktop
| | +copyFiles ./lib/pidgin "$PREFIX/lib"
| | +installMan 1 ./man/man1/pidgin.1
| | +installDesktop "Networking/Instant Messaging" ./share/applications/pidgin.desktop
| | installLocale ./share/locale
| | copyFiles ./share/pixmaps "$PREFIX/share"
| | copyFiles ./share/sounds "$PREFIX/share"
| | -installIcon ./share/pixmaps/gaim.png
| | +installIcon ./share/pixmaps/pidgin.png
| | # install and fix the .pc file
| | # move this to the -devel package when I make one
| | -# copyFile ./lib/pkgconfig/gaim.pc "$PREFIX/lib/pkgconfig/gaim.pc"
| | -# safeSed "$PREFIX/lib/pkgconfig/gaim.pc" "s|prefix=/usr/local|prefix=$PREFIX|"
| | +# copyFile ./lib/pkgconfig/pidgin.pc "$PREFIX/lib/pkgconfig/pidgin.pc"
| | +# safeSed "$PREFIX/lib/pkgconfig/pidgin.pc" "s|prefix=/usr/local|prefix=$PREFIX|"
| |
| | [Uninstall]
| | # Usually just the following line is enough to uninstall everything
| | ============================================================
| | --- pidgin.spec.in 215efbbd4c28f5134ebe00d188acb13840837313
| | +++ pidgin.spec.in 6ca03af99b542c1dc6333d4ea44cd7461c99e6c7
| | @@ -354,7 +354,7 @@ fi
| | %{_libdir}/pkgconfig/purple.pc
| | %{_libdir}/pkgconfig/pidgin.pc
| | %{_libdir}/pkgconfig/gnt.pc
| | -%{_datadir}/aclocal/gaim.m4
| | +%{_datadir}/aclocal/pidgin.m4
| | %if 0%{?_with_dbus:1}
| | %{_libdir}/libpurple-client.so
| | %endif
| | ============================================================
| | --- po/POTFILES.in 7f4e5eb5abbfff30b594a20e6f42536fd437c9d2
| | +++ po/POTFILES.in 508e74549f759671bdacb02f3d37404c70db01d9
| | @@ -38,7 +38,7 @@ libpurple/ft.c
| | libpurple/desktopitem.c
| | libpurple/dnsquery.c
| | libpurple/ft.c
| | -libpurple/gconf/gaim.schemas.in
| | +libpurple/gconf/purple.schemas.in
| | libpurple/log.c
| | libpurple/plugin.c
| | libpurple/plugins/autoaccept.c
| | @@ -181,7 +181,6 @@ pidgin/plugins/gaiminc.c
| | pidgin/plugins/convcolors.c
| | pidgin/plugins/extplacement.c
| | pidgin/plugins/gaiminc.c
| | -pidgin/plugins/gaimrc.c
| | pidgin/plugins/gestures/gestures.c
| | pidgin/plugins/gevolution/add_buddy_dialog.c
| | pidgin/plugins/gevolution/assoc-buddy.c
| | @@ -196,6 +195,7 @@ pidgin/plugins/notify.c
| | pidgin/plugins/markerline.c
| | pidgin/plugins/musicmessaging/musicmessaging.c
| | pidgin/plugins/notify.c
| | +pidgin/plugins/pidginrc.c
| | pidgin/plugins/raw.c
| | pidgin/plugins/relnot.c
| | pidgin/plugins/spellchk.c
| | ============================================================
| | --- libpurple/plugin.c 721329b7c5935f9b85d48c764f70d610669a9982
| | +++ libpurple/plugin.c 6116d030f8485eabea8e4ad1a66ae7d2b9ee20c3
| | @@ -375,7 +375,7 @@ purple_plugin_probe(const char *filename
| | * enter an infinite loop in certain situations by passing
| | * purple_find_plugin_by_id a NULL value. -- ecoffey
| | */
| | - if (!plugin->info->id || !strcmp(plugin->info->id, ""))
| | + if (plugin->info->id == NULL || *plugin->info->id == '\0')
| | {
| | plugin->error = g_strdup_printf(_("This plugin has not defined an ID."));
| | purple_debug_error("plugins", "%s is not loadable: info->id is not defined.\n", plugin->path);
To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from 9b3b5e5e845e8180f39ea97f41e9b1f3ecd8de3c
More information about the Commits
mailing list