aboutsummaryrefslogtreecommitdiffstats
path: root/storage_xml.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2014-07-24 00:51:07 -0300
committerdequis <dx@dxzone.com.ar>2014-07-24 00:51:07 -0300
commit1783ab6964c9a8ffc3488bb5243f0b15858f4e74 (patch)
tree9f87690db5ada596a220b6abdf09bc87e3c05dc2 /storage_xml.c
parent757515a793748591e8689167e153ea9ff26ff9e5 (diff)
Gadugadu local contact storage (ticket #917)
Patch originally by MichaƂ Siejak, adapted for 3.2.1
Diffstat (limited to 'storage_xml.c')
-rw-r--r--storage_xml.c7
1 files changed, 6 insertions, 1 deletions
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;