From: <the...@us...> - 2006-07-02 21:52:15
|
Revision: 16400 Author: thekingant Date: 2006-07-02 14:52:06 -0700 (Sun, 02 Jul 2006) ViewCVS: http://svn.sourceforge.net/gaim/?rev=16400&view=rev Log Message: ----------- part of sf patch #1490646, from Jonty Wareing & Jono Cole "The user can now specify their AIM and Jabber ID in the preferences" Modified Paths: -------------- trunk/src/protocols/bonjour/bonjour.c trunk/src/protocols/bonjour/dns_sd.c Modified: trunk/src/protocols/bonjour/bonjour.c =================================================================== --- trunk/src/protocols/bonjour/bonjour.c 2006-07-02 21:12:54 UTC (rev 16399) +++ trunk/src/protocols/bonjour/bonjour.c 2006-07-02 21:52:06 UTC (rev 16400) @@ -127,8 +127,8 @@ bd->dns_sd_data->phsh = g_strdup(""); bd->dns_sd_data->email = g_strdup(gaim_account_get_string(account, "email", "")); bd->dns_sd_data->vc = g_strdup(""); - bd->dns_sd_data->jid = g_strdup(""); - bd->dns_sd_data->AIM = g_strdup(""); + bd->dns_sd_data->jid = g_strdup(gaim_account_get_string(account, "jid", "")); + bd->dns_sd_data->AIM = g_strdup(gaim_account_get_string(account, "AIM", "")); status = gaim_account_get_active_status(account); presence = gaim_account_get_presence(account); @@ -588,6 +588,12 @@ option = gaim_account_option_string_new(_("E-mail"), "email", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + option = gaim_account_option_string_new(_("AIM Account"), "AIM", ""); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + + option = gaim_account_option_string_new(_("Jabber Account"), "jid", ""); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); + my_protocol = plugin; } Modified: trunk/src/protocols/bonjour/dns_sd.c =================================================================== --- trunk/src/protocols/bonjour/dns_sd.c 2006-07-02 21:12:54 UTC (rev 16399) +++ trunk/src/protocols/bonjour/dns_sd.c 2006-07-02 21:52:06 UTC (rev 16400) @@ -251,12 +251,20 @@ sw_text_record_add_key_and_string_value(dns_data, "port.p2pj", BONJOUR_DEFAULT_PORT); sw_text_record_add_key_and_string_value(dns_data, "phsh", data->phsh); sw_text_record_add_key_and_string_value(dns_data, "status", data->status); - sw_text_record_add_key_and_string_value(dns_data, "msg", data->msg); - sw_text_record_add_key_and_string_value(dns_data, "email", data->email); sw_text_record_add_key_and_string_value(dns_data, "vc", data->vc); - sw_text_record_add_key_and_string_value(dns_data, "jid", data->jid); - sw_text_record_add_key_and_string_value(dns_data, "AIM", data->AIM); + if ((data->email != NULL) && (*data->email != '\0')) + sw_text_record_add_key_and_string_value(dns_data, "email", data->email); + + if ((data->jid != NULL) && (*data->jid != '\0')) + sw_text_record_add_key_and_string_value(dns_data, "jid", data->jid); + + if ((data->AIM != NULL) && (*data->AIM != '\0')) + sw_text_record_add_key_and_string_value(dns_data, "AIM", data->AIM); + + if ((data->msg != NULL) && (*data->msg != '\0')) + sw_text_record_add_key_and_string_value(dns_data, "msg", data->msg); + /* Publish the service */ switch (type) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |