From 1783ab6964c9a8ffc3488bb5243f0b15858f4e74 Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 24 Jul 2014 00:51:07 -0300 Subject: Gadugadu local contact storage (ticket #917) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch originally by MichaƂ Siejak, adapted for 3.2.1 --- storage_xml.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'storage_xml.c') diff --git a/storage_xml.c b/storage_xml.c index d32ed25f..ddd09938 100644 --- a/storage_xml.c +++ b/storage_xml.c @@ -86,7 +86,7 @@ static xt_status handle_account( struct xt_node *node, gpointer data ) char *protocol, *handle, *server, *password = NULL, *autoconnect, *tag; char *pass_b64 = NULL; unsigned char *pass_cr = NULL; - int pass_len; + int pass_len, local = 0; struct prpl *prpl = NULL; account_t *acc; struct xt_node *c; @@ -99,7 +99,10 @@ static xt_status handle_account( struct xt_node *node, gpointer data ) protocol = xt_find_attr( node, "protocol" ); if( protocol ) + { prpl = find_protocol( protocol ); + local = protocol_account_islocal( protocol ); + } if( !handle || !pass_b64 || !protocol || !prpl ) return XT_ABORT; @@ -113,6 +116,8 @@ static xt_status handle_account( struct xt_node *node, gpointer data ) set_setstr( &acc->set, "auto_connect", autoconnect ); if( tag ) set_setstr( &acc->set, "tag", tag ); + if( local ) + acc->flags |= ACC_FLAG_LOCAL; } else return XT_ABORT; -- cgit v1.2.3