[PATCH 0/2] gst-dsp: stable patches

1 view
Skip to first unread message

Felipe Contreras

unread,
Aug 28, 2010, 9:39:21 AM8/28/10
to msn-pecan, Felipe Contreras
From: Felipe Contreras <felipe.c...@nokia.com>

Hi,

Here are some patches for the next stable release.

Felipe Contreras (2):
plugin: add official set_alias()
oim: fix crash on bad auth

msn.c | 26 ++++++++++++++++++++++++--
pn_oim.c | 38 ++++++++++++++++++++++++--------------
2 files changed, 48 insertions(+), 16 deletions(-)

--
1.7.2.2

Felipe Contreras

unread,
Aug 28, 2010, 9:39:23 AM8/28/10
to msn-pecan, Felipe Contreras
Signed-off-by: Felipe Contreras <felipe.c...@gmail.com>
---
pn_oim.c | 38 ++++++++++++++++++++++++--------------
1 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/pn_oim.c b/pn_oim.c
index 7e292c1..45c0568 100644
--- a/pn_oim.c
+++ b/pn_oim.c
@@ -738,14 +738,19 @@ process_body_auth (OimRequest *oim_request,
gchar *end, *expires;
time_t t;

- cur = strstr (cur, "<wsu:Expires>") + 13;
- end = strchr (cur, '<');
- expires = g_strndup (cur, end - cur);
+ cur = strstr (cur, "<wsu:Expires>");
+ if (cur) {
+ cur += 13;
+ end = strchr (cur, '<');
+ if (end) {
+ expires = g_strndup (cur, end - cur);

- t = parse_expiration_time (expires);
- oim_request->oim_session->expiration_time.messenger_msn_com = t;
+ t = parse_expiration_time (expires);
+ oim_request->oim_session->expiration_time.messenger_msn_com = t;

- g_free (expires);
+ g_free (expires);
+ }
+ }
}

cur = strstr (body, "<wsse:BinarySecurityToken Id=\"Compact2\">");
@@ -767,14 +772,19 @@ process_body_auth (OimRequest *oim_request,
gchar *end, *expires;
time_t t;

- cur = strstr (cur, "<wsu:Expires>") + 13;
- end = strchr (cur, '<');
- expires = g_strndup (cur, end - cur);
+ cur = strstr (cur, "<wsu:Expires>");
+ if (cur) {
+ cur += 13;
+ end = strchr (cur, '<');
+ if (end) {
+ expires = g_strndup (cur, end - cur);

- t = parse_expiration_time (expires);
- oim_request->oim_session->expiration_time.messengersecure_live_com = t;
+ t = parse_expiration_time (expires);
+ oim_request->oim_session->expiration_time.messengersecure_live_com = t;

- g_free (expires);
+ g_free (expires);
+ }
+ }
}
}

--
1.7.2.2

Felipe Contreras

unread,
Aug 28, 2010, 9:39:22 AM8/28/10
to msn-pecan, Felipe Contreras
New in libpurple 2.7.0.

Signed-off-by: Felipe Contreras <felipe.c...@gmail.com>
---

msn.c | 26 ++++++++++++++++++++++++--
1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/msn.c b/msn.c
index 4aa1dc0..cbd210d 100644
--- a/msn.c
+++ b/msn.c
@@ -94,8 +94,11 @@ typedef struct
} MsnEmoticon;
#endif /* PURPLE_VERSION_CHECK(2,5,0) */

+#if !PURPLE_VERSION_CHECK(2,7,0)
void PURPLE_MODULE_NAME(msn_pecan, set_alias) (PurpleConnection *gc,
const gchar *value);
+#endif
+
static void msn_set_prp(PurpleConnection *gc, const char *type, const char *entry);

static gboolean
@@ -194,12 +197,25 @@ set_friendly_name (PurpleConnection *gc,
msn_session_set_public_alias (gc->proto_data, entry);
}

+#if PURPLE_VERSION_CHECK(2,7,0)
+static void
+set_alias(PurpleConnection *pc, const char *alias,
+ PurpleSetPublicAliasSuccessCallback success_cb,
+ PurpleSetPublicAliasFailureCallback failure_cb)
+{
+ PurpleAccount *account;
+ account = purple_connection_get_account(pc);
+ set_friendly_name(pc, alias);
+ success_cb(account, alias);
+}
+#else
PURPLE_MODULE_EXPORT void
PURPLE_MODULE_NAME(msn_pecan, set_alias) (PurpleConnection *gc,
const gchar *value)
{
set_friendly_name (gc, value);
}
+#endif

/* TODO do we really need to check for the entry to be empty? */
static void
@@ -1826,9 +1842,15 @@ static PurplePluginProtocolInfo prpl_info =
msn_attention_types, /* attention_types */
#if PURPLE_VERSION_CHECK(2,5,0)
sizeof (PurplePluginProtocolInfo), /* struct_size */
+ NULL, /* get_account_text_table */
+ NULL, /* initiate_media */
+ NULL, /* get_media_caps */
+#if PURPLE_VERSION_CHECK(2,7,0)
+ NULL, /* get_moods */
+ set_alias, /* set_public_alias */
+ NULL, /* get_public_alias */
+#endif
#endif /* PURPLE_VERSION_CHECK(2,5,0) */
- /* padding */
- NULL
};

static PurplePluginInfo info =
--
1.7.2.2

Reply all
Reply to author
Forward
0 new messages