Mercurial > pidgin.yaz
changeset 22133:0d7d0a60d42d
merge of '773c6dde93b5b2109d9c627dca717dd6c5468094'
and 'd25af79abd2f50e0aba4985544f0ca976d0e7788'
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Thu, 17 Jan 2008 05:53:25 +0000 |
parents | 840e7e1b6dac (current diff) d59cdfcb6ed1 (diff) |
children | 33abfb98a460 |
files | |
diffstat | 11 files changed, 39 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dnssrv.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/dnssrv.c Thu Jan 17 05:53:25 2008 +0000 @@ -358,9 +358,12 @@ /* Child */ if (pid == 0) { + g_free(query); + close(out[0]); close(in[1]); resolve(in[0], out[1]); + /* resolve() does not return */ } close(out[1]);
--- a/libpurple/protocols/irc/dcc_send.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/irc/dcc_send.c Thu Jan 17 05:53:25 2008 +0000 @@ -56,7 +56,7 @@ l = htonl(xfer->bytes_sent); result = write(xfer->fd, &l, sizeof(l)); if (result != sizeof(l)) { - purple_debug_error("irc", "unable to send acknowledgement: %s\n", strerror(errno)); + purple_debug_error("irc", "unable to send acknowledgement: %s\n", g_strerror(errno)); /* TODO: We should probably close the connection here or something. */ } }
--- a/libpurple/protocols/msnp9/notification.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/msnp9/notification.c Thu Jan 17 05:53:25 2008 +0000 @@ -1012,7 +1012,7 @@ { purple_debug_error("msn", "Error opening temp passport file: %s\n", - strerror(errno)); + g_strerror(errno)); } else { @@ -1061,7 +1061,7 @@ { purple_debug_error("msn", "Error closing temp passport file: %s\n", - strerror(errno)); + g_strerror(errno)); g_unlink(session->passport_info.file); g_free(session->passport_info.file);
--- a/libpurple/protocols/msnp9/servconn.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/msnp9/servconn.c Thu Jan 17 05:53:25 2008 +0000 @@ -392,7 +392,7 @@ return; else if (len <= 0) { - purple_debug_error("msn", "servconn read error, len: %d error: %s\n", len, strerror(errno)); + purple_debug_error("msn", "servconn read error, len: %d error: %s\n", len, g_strerror(errno)); msn_servconn_got_error(servconn, MSN_SERVCONN_ERROR_READ); return;
--- a/libpurple/protocols/oscar/family_buddy.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/oscar/family_buddy.c Thu Jan 17 05:53:25 2008 +0000 @@ -219,8 +219,9 @@ if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) ret = userfunc(od, conn, frame, &userinfo); - if (snac->subtype == SNAC_SUBTYPE_BUDDY_ONCOMING) - aim_locate_requestuserinfo(od, userinfo.sn); + if (snac->subtype == SNAC_SUBTYPE_BUDDY_ONCOMING && userinfo.flags & AIM_FLAG_AWAY) + aim_locate_autofetch_away_message(od, userinfo.sn); + aim_info_free(&userinfo); return ret;
--- a/libpurple/protocols/oscar/family_locate.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/oscar/family_locate.c Thu Jan 17 05:53:25 2008 +0000 @@ -386,11 +386,11 @@ } void -aim_locate_requestuserinfo(OscarData *od, const char *sn) +aim_locate_autofetch_away_message(OscarData *od, const char *sn) { struct userinfo_node *cur; - /* Make sure we haven't already requested info for this buddy */ + /* Make sure we haven't already made an info request for this buddy */ for (cur = od->locate.requested; cur != NULL; cur = cur->next) if (aim_sncmp(sn, cur->sn) == 0) return; @@ -401,7 +401,7 @@ cur->next = od->locate.requested; od->locate.requested = cur; - aim_locate_getinfoshort(od, cur->sn, 0x00000003); + aim_locate_getinfoshort(od, cur->sn, 0x00000002); } aim_userinfo_t *aim_locate_finduserinfo(OscarData *od, const char *sn) {
--- a/libpurple/protocols/oscar/oscar.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Thu Jan 17 05:53:25 2008 +0000 @@ -1735,7 +1735,6 @@ int type = 0; gboolean buddy_is_away = FALSE; const char *status_id; - char *itmsurl = NULL; va_list ap; aim_userinfo_t *info; @@ -1783,11 +1782,6 @@ status_id = OSCAR_STATUS_ID_AVAILABLE; } - if (info->itmsurl_encoding && info->itmsurl && info->itmsurl_len) - /* Grab the iTunes Music Store URL */ - itmsurl = oscar_encoding_to_utf8(account, info->itmsurl_encoding, - info->itmsurl, info->itmsurl_len); - if (info->flags & AIM_FLAG_WIRELESS) { purple_prpl_got_user_status(account, info->sn, OSCAR_STATUS_ID_MOBILE, NULL); @@ -1795,27 +1789,31 @@ purple_prpl_got_user_status_deactive(account, info->sn, OSCAR_STATUS_ID_MOBILE); } - if (!strcmp(status_id, OSCAR_STATUS_ID_AVAILABLE)) + if (status_id == OSCAR_STATUS_ID_AVAILABLE) { char *message = NULL; + char *itmsurl = NULL; if (info->status != NULL && info->status[0] != '\0') /* Grab the available message */ message = oscar_encoding_to_utf8(account, info->status_encoding, info->status, info->status_len); + if (info->itmsurl_encoding && info->itmsurl && info->itmsurl_len) + /* Grab the iTunes Music Store URL */ + itmsurl = oscar_encoding_to_utf8(account, info->itmsurl_encoding, + info->itmsurl, info->itmsurl_len); + purple_prpl_got_user_status(account, info->sn, status_id, "message", message, "itmsurl", itmsurl, NULL); g_free(message); + g_free(itmsurl); } else { - purple_prpl_got_user_status(account, info->sn, status_id, - "itmsurl", itmsurl, NULL); - } - - g_free(itmsurl); + purple_prpl_got_user_status(account, info->sn, status_id, NULL); + } /* Login time stuff */ if (info->present & AIM_USERINFO_PRESENT_ONLINESINCE)
--- a/libpurple/protocols/oscar/oscar.h Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.h Thu Jan 17 05:53:25 2008 +0000 @@ -1074,7 +1074,7 @@ /* 0x000f */ int aim_locate_setinterests(OscarData *od, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy); /* 0x0015 */ int aim_locate_getinfoshort(OscarData *od, const char *sn, guint32 flags); -void aim_locate_requestuserinfo(OscarData *od, const char *sn); +void aim_locate_autofetch_away_message(OscarData *od, const char *sn); guint32 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len); guint32 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len); void aim_info_free(aim_userinfo_t *);
--- a/libpurple/protocols/zephyr/zephyr.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Thu Jan 17 05:53:25 2008 +0000 @@ -165,7 +165,7 @@ size_t len = strlen(zsubstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zsubstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno)); } else { ret_val = ZERR_NONE; } @@ -1380,7 +1380,7 @@ size_t len = strlen(zlocstr); size_t result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zlocstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno)); } g_free(zlocstr); } @@ -2293,7 +2293,7 @@ len = strlen(zlocstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zlocstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write a message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write a message: %s\n", g_strerror(errno)); } g_free(zlocstr); } @@ -2322,7 +2322,7 @@ len = strlen(zexpstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zexpstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write message: %s\n", g_strerror(errno)); } g_free(zexpstr); } @@ -2336,7 +2336,7 @@ len = strlen(zexpstr); result = write(zephyr->totzc[ZEPHYR_FD_WRITE],zexpstr,len); if (result != len) { - purple_debug_error("zephyr", "Unable to write message: %s\n", strerror(errno)); + purple_debug_error("zephyr", "Unable to write message: %s\n", g_strerror(errno)); } g_free(zexpstr); }
--- a/libpurple/prpl.c Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/prpl.c Thu Jan 17 05:53:25 2008 +0000 @@ -87,7 +87,7 @@ } const char * -purple_attention_type_get_name(PurpleAttentionType *type) +purple_attention_type_get_name(const PurpleAttentionType *type) { g_return_val_if_fail(type != NULL, NULL); @@ -95,7 +95,7 @@ } const char * -purple_attention_type_get_incoming_desc(PurpleAttentionType *type) +purple_attention_type_get_incoming_desc(const PurpleAttentionType *type) { g_return_val_if_fail(type != NULL, NULL); @@ -103,7 +103,7 @@ } const char * -purple_attention_type_get_outgoing_desc(PurpleAttentionType *type) +purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type) { g_return_val_if_fail(type != NULL, NULL); @@ -111,7 +111,7 @@ } const char * -purple_attention_type_get_icon_name(PurpleAttentionType *type) +purple_attention_type_get_icon_name(const PurpleAttentionType *type) { g_return_val_if_fail(type != NULL, NULL); @@ -122,7 +122,7 @@ } const char * -purple_attention_type_get_unlocalized_name(PurpleAttentionType *type) +purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type) { g_return_val_if_fail(type != NULL, NULL);
--- a/libpurple/prpl.h Thu Jan 17 05:53:12 2008 +0000 +++ b/libpurple/prpl.h Thu Jan 17 05:53:25 2008 +0000 @@ -491,7 +491,7 @@ * @return The name. * @since 2.4.0 */ -const char *purple_attention_type_get_name(PurpleAttentionType *type); +const char *purple_attention_type_get_name(const PurpleAttentionType *type); /** * Get the attention type's description shown when the event is received. @@ -500,7 +500,7 @@ * @return The description. * @since 2.4.0 */ -const char *purple_attention_type_get_incoming_desc(PurpleAttentionType *type); +const char *purple_attention_type_get_incoming_desc(const PurpleAttentionType *type); /** * Get the attention type's description shown when the event is sent. @@ -509,7 +509,7 @@ * @return The description. * @since 2.4.0 */ -const char *purple_attention_type_get_outgoing_desc(PurpleAttentionType *type); +const char *purple_attention_type_get_outgoing_desc(const PurpleAttentionType *type); /** * Get the attention type's icon name. @@ -519,7 +519,7 @@ * @note Icons are optional for attention events. * @since 2.4.0 */ -const char *purple_attention_type_get_icon_name(PurpleAttentionType *type); +const char *purple_attention_type_get_icon_name(const PurpleAttentionType *type); /** * Get the attention type's unlocalized name; this is useful for some UIs. @@ -528,7 +528,7 @@ * @return The unlocalized name. * @since 2.4.0 */ -const char *purple_attention_type_get_unlocalized_name(PurpleAttentionType *type); +const char *purple_attention_type_get_unlocalized_name(const PurpleAttentionType *type); /*@}*/