--- a/jingle-ft/filetransfer.c Sun Oct 03 22:01:59 2010 +0200
+++ b/jingle-ft/filetransfer.c Sun Mar 27 21:35:45 2011 +0200
@@ -101,9 +101,13 @@
.next = NULL,
};
+#ifdef MCABBER_API_HAVE_CMD_ID
+static gpointer jft_cmdid;
+#endif
+
/**
- * @brief Check if a node description with xmlns of JFT is correct
+ * @brief Check if a node description with xmlns of JFT is correct
*
* @param cn the jinglecontent a node description
* @param err contain an error of the domain JINGLE_CHECK_ERROR
@@ -797,7 +801,12 @@
compl_add_category_word(jft_cid, "flush");
}
/* Add command */
+#ifdef MCABBER_API_HAVE_CMD_ID
+ jft_cmdid = cmd_add("jft", "Manage file transfer", jft_cid, 0, do_sendfile,
+ NULL);
+#else
cmd_add("jft", "Manage file transfer", jft_cid, 0, do_sendfile, NULL);
+#endif
}
static void jingle_ft_uninit(void)
@@ -805,8 +814,12 @@
g_slist_free(info_list);
xmpp_del_feature(NS_JINGLE_APP_FT);
jingle_unregister_app(NS_JINGLE_APP_FT);
- cmd_del("file");
if (jft_cid)
compl_del_category(jft_cid);
+#ifdef MCABBER_API_HAVE_CMD_ID
+ cmd_del(jft_cmdid);
+#else
+ cmd_del("file");
+#endif
}
/* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... */