[pidgin-sipe] add patch to replace deprecated glib2 functions for F17+
stefanb
stefanb at fedoraproject.org
Mon Jan 9 06:04:11 UTC 2012
commit 442787e6444459233c76c4cdb6f1cead81bb83be
Author: Stefan Becker <chemobejk at gmail.com>
Date: Mon Jan 9 08:03:37 2012 +0200
add patch to replace deprecated glib2 functions for F17+
...ipe-1.12.0-replace-deprecated-glib2-funcs.patch | 155 ++++++++++++++++++++
pidgin-sipe.spec | 7 +-
2 files changed, 161 insertions(+), 1 deletions(-)
---
diff --git a/pidgin-sipe-1.12.0-replace-deprecated-glib2-funcs.patch b/pidgin-sipe-1.12.0-replace-deprecated-glib2-funcs.patch
new file mode 100644
index 0000000..1c3fe5f
--- /dev/null
+++ b/pidgin-sipe-1.12.0-replace-deprecated-glib2-funcs.patch
@@ -0,0 +1,155 @@
+diff --git a/src/core/sip-transport.c b/src/core/sip-transport.c
+index 378c059..7f9286b 100644
+--- a/src/core/sip-transport.c
++++ b/src/core/sip-transport.c
+@@ -308,12 +308,12 @@ static void fill_auth(const gchar *hdr, struct sip_auth *auth)
+ return;
+ }
+
+- if (!g_strncasecmp(hdr, "NTLM", 4)) {
++ if (!g_ascii_strncasecmp(hdr, "NTLM", 4)) {
+ SIPE_DEBUG_INFO_NOFORMAT("fill_auth: type NTLM");
+ auth->type = AUTH_TYPE_NTLM;
+ hdr += 5;
+ auth->nc = 1;
+- } else if (!g_strncasecmp(hdr, "Kerberos", 8)) {
++ } else if (!g_ascii_strncasecmp(hdr, "Kerberos", 8)) {
+ SIPE_DEBUG_INFO_NOFORMAT("fill_auth: type Kerberos");
+ auth->type = AUTH_TYPE_KERBEROS;
+ hdr += 9;
+@@ -566,7 +566,7 @@ static struct transaction *transactions_find(struct sip_transport *transport,
+ key = g_strdup_printf("<%s><%s>", call_id, cseq);
+ while (transactions) {
+ struct transaction *trans = transactions->data;
+- if (!g_strcasecmp(trans->key, key)) {
++ if (!g_ascii_strcasecmp(trans->key, key)) {
+ g_free(key);
+ return trans;
+ }
+@@ -1113,7 +1113,7 @@ static gboolean process_register_response(struct sipe_core_private *sipe_private
+ {
+ gchar *redirect = parse_from(sipmsg_find_header(msg, "Contact"));
+
+- if (redirect && (g_strncasecmp("sip:", redirect, 4) == 0)) {
++ if (redirect && (g_ascii_strncasecmp("sip:", redirect, 4) == 0)) {
+ gchar **parts = g_strsplit(redirect + 4, ";", 0);
+ gchar **tmp;
+ gchar *hostname;
+@@ -1129,8 +1129,8 @@ static gboolean process_register_response(struct sipe_core_private *sipe_private
+ while (parts[i]) {
+ tmp = g_strsplit(parts[i], "=", 0);
+ if (tmp[1]) {
+- if (g_strcasecmp("transport", tmp[0]) == 0) {
+- if (g_strcasecmp("tcp", tmp[1]) == 0) {
++ if (g_ascii_strcasecmp("transport", tmp[0]) == 0) {
++ if (g_ascii_strcasecmp("tcp", tmp[1]) == 0) {
+ transport = SIPE_TRANSPORT_TCP;
+ }
+ }
+diff --git a/src/core/sipe-chat.c b/src/core/sipe-chat.c
+index be8f646..d0c7852 100644
+--- a/src/core/sipe-chat.c
++++ b/src/core/sipe-chat.c
+@@ -419,10 +419,10 @@ process_info_response(struct sipe_core_private *sipe_private,
+ return FALSE;
+ }
+
+- if (allow && !g_strcasecmp(allow, "true")) {
++ if (allow && !g_ascii_strcasecmp(allow, "true")) {
+ SIPE_DEBUG_INFO("process_info_response: %s has voted PRO", with);
+ dialog->election_vote = 1;
+- } else if (allow && !g_strcasecmp(allow, "false")) {
++ } else if (allow && !g_ascii_strcasecmp(allow, "false")) {
+ SIPE_DEBUG_INFO("process_info_response: %s has voted CONTRA", with);
+ dialog->election_vote = -1;
+ }
+diff --git a/src/core/sipe-conf.c b/src/core/sipe-conf.c
+index 7478d40..e7ba518 100644
+--- a/src/core/sipe-conf.c
++++ b/src/core/sipe-conf.c
+@@ -1033,7 +1033,7 @@ sipe_process_conference(struct sipe_core_private *sipe_private,
+ if (!sipe_backend_chat_find(session->chat_session->backend, user_uri)) {
+ sipe_backend_chat_add(session->chat_session->backend,
+ user_uri,
+- !just_joined && g_strcasecmp(user_uri, self));
++ !just_joined && g_ascii_strcasecmp(user_uri, self));
+ }
+ if (is_operator) {
+ sipe_backend_chat_operator(session->chat_session->backend,
+diff --git a/src/core/sipe-incoming.c b/src/core/sipe-incoming.c
+index 1f100f2..0000d9d 100644
+--- a/src/core/sipe-incoming.c
++++ b/src/core/sipe-incoming.c
+@@ -94,7 +94,7 @@ void process_incoming_bye(struct sipe_core_private *sipe_private,
+ if (session->chat_session &&
+ (session->chat_session->type == SIPE_CHAT_TYPE_MULTIPARTY) &&
+ session->chat_session->id &&
+- !g_strcasecmp(from, session->chat_session->id))
++ !g_ascii_strcasecmp(from, session->chat_session->id))
+ sipe_chat_set_roster_manager(session, NULL);
+
+ sipe_im_cancel_unconfirmed(sipe_private, session, callid, from);
+@@ -104,7 +104,7 @@ void process_incoming_bye(struct sipe_core_private *sipe_private,
+ sipe_dialog_free(dialog);
+ if (session->chat_session) {
+ if ((session->chat_session->type == SIPE_CHAT_TYPE_CONFERENCE) &&
+- !g_strcasecmp(from, session->im_mcu_uri)) {
++ !g_ascii_strcasecmp(from, session->im_mcu_uri)) {
+ SIPE_DEBUG_INFO("process_incoming_bye: disconnected from conference %s",
+ session->im_mcu_uri);
+ sipe_conf_immcu_closed(sipe_private, session);
+@@ -417,7 +417,7 @@ void process_incoming_invite(struct sipe_core_private *sipe_private,
+ is_multiparty = TRUE;
+ }
+ }
+- if (trig_invite && !g_strcasecmp(trig_invite, "TRUE")) {
++ if (trig_invite && !g_ascii_strcasecmp(trig_invite, "TRUE")) {
+ is_multiparty = TRUE;
+ }
+
+@@ -479,8 +479,8 @@ void process_incoming_invite(struct sipe_core_private *sipe_private,
+ struct sipendpoint *end_point = entry->data;
+ entry = entry->next;
+
+- if (!g_strcasecmp(from, end_point->contact) ||
+- !g_strcasecmp(to, end_point->contact))
++ if (!g_ascii_strcasecmp(from, end_point->contact) ||
++ !g_ascii_strcasecmp(to, end_point->contact))
+ continue;
+
+ dialog = sipe_dialog_find(session, end_point->contact);
+diff --git a/src/core/sipe.c b/src/core/sipe.c
+index a5d63e9..4a0f694 100644
+--- a/src/core/sipe.c
++++ b/src/core/sipe.c
+@@ -5171,7 +5171,7 @@ static gboolean process_search_contact_response(struct sipe_core_private *sipe_p
+
+ if ((mrow = sipe_xml_child(searchResults, "Body/directorySearch/moreAvailable")) != NULL) {
+ char *data = sipe_xml_data(mrow);
+- more = (g_strcasecmp(data, "true") == 0);
++ more = (g_ascii_strcasecmp(data, "true") == 0);
+ g_free(data);
+ }
+
+diff --git a/src/core/sipmsg.c b/src/core/sipmsg.c
+index 8890447..24d74df 100644
+--- a/src/core/sipmsg.c
++++ b/src/core/sipmsg.c
+@@ -237,7 +237,7 @@ void sipmsg_strip_headers(struct sipmsg *msg, const gchar *keepers[]) {
+
+ elem = entry->data;
+ while (keepers[i]) {
+- if (!g_strcasecmp(elem->name, keepers[i])) {
++ if (!g_ascii_strcasecmp(elem->name, keepers[i])) {
+ keeper = TRUE;
+ break;
+ }
+@@ -450,7 +450,7 @@ gchar *sipmsg_find_auth_header(struct sipmsg *msg, const gchar *name) {
+ if (elem && elem->name &&
+ (sipe_strcase_equal(elem->name,"WWW-Authenticate") ||
+ sipe_strcase_equal(elem->name,"Authentication-Info")) ) {
+- if (!g_strncasecmp((gchar *)elem->value, name, name_len)) {
++ if (!g_ascii_strncasecmp((gchar *)elem->value, name, name_len)) {
+ /* SIPE_DEBUG_INFO("elem->value: %s", elem->value); */
+ return elem->value;
+ }
diff --git a/pidgin-sipe.spec b/pidgin-sipe.spec
index ff49fc5..7207eab 100644
--- a/pidgin-sipe.spec
+++ b/pidgin-sipe.spec
@@ -1,12 +1,13 @@
Name: pidgin-sipe
Version: 1.12.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Pidgin protocol plugin to connect to MS Office Communicator
Group: Applications/Internet
License: GPLv2+
URL: http://sipe.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/sipe/sipe/pidgin-sipe-%{version}/pidgin-sipe-%{version}.tar.bz2
+Patch0: pidgin-sipe-1.12.0-replace-deprecated-glib2-funcs.patch
BuildRequires: zlib-devel, libpurple-devel >= 2.8.0, e2fsprogs-devel, intltool
BuildRequires: krb5-devel, gettext, libxml2-devel, glib2-devel >= 2.28.0
@@ -48,6 +49,7 @@ This package provides the protocol plugin for libpurple clients.
%prep
%setup -q
+%patch0 -p1 -b .replace-deprecated-glib2-funcs
%build
@@ -81,6 +83,9 @@ rm -rf %{buildroot}
%changelog
+* Mon Jan 09 2012 Stefan Becker <chemobejk at gmail.com> - 1.12.0-3
+- add patch to replace deprecated glib2 functions for F17+
+
* Sun Jan 08 2012 Stefan Becker <chemobejk at gmail.com> - 1.12.0-2
- enable audio/video call support for F15+ (bz #761528)
More information about the scm-commits
mailing list