[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src account.c,1.8,1.9 account.h,1.5,1.6 util
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src account.c,1.8,1.9 account.h,1.5,1.6 util.c,1.16,1.17 |
Date: |
Mon, 20 Jan 2003 05:02:20 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv11711/src
Modified Files:
account.c account.h util.c
Log Message:
- src/account.[ch] src/util.c
Add deletion support to offline contact mgmt
Add connecting flag to eb_local_account
- modules/msn2/msn.C modules/yahoo2/yahoo.c
Use connecting flag
Index: account.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- account.c 18 Jan 2003 12:41:19 -0000 1.8
+++ account.c 20 Jan 2003 10:02:16 -0000 1.9
@@ -192,4 +192,15 @@
return 1;
}
-
+eb_account *dummy_account(char *handle, char *group, int serviceid)
+{
+ eb_account *dum = g_new0(eb_account, 1);
+ dum->account_contact = g_new0(struct contact, 1);
+ dum->account_contact->group = g_new0(grouplist, 1);
+
+ strcpy(dum->handle, handle);
+ strcpy(dum->account_contact->group->name, group);
+ dum->service_id = serviceid;
+
+ return dum;
+}
Index: account.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/account.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- account.h 16 Jan 2003 13:11:01 -0000 1.5
+++ account.h 20 Jan 2003 10:02:16 -0000 1.6
@@ -74,6 +74,8 @@
int load_contacts();
void write_contact_list();
void write_account_list();
+eb_account *dummy_account(char *handle, char *group, int serviceid);
+
#ifdef __cplusplus
}
#endif
Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- util.c 19 Jan 2003 11:18:38 -0000 1.16
+++ util.c 20 Jan 2003 10:02:16 -0000 1.17
@@ -641,7 +641,7 @@
eb_local_account * ela = (eb_local_account *)(node->data);
eb_debug(DBG_CORE, "%s %s\n",
eb_services[ela->service_id].name, ela->handle);
- if( ela->service_id == second && ela->connected )
+ if( ela->service_id == second && (ela->connected ||
ela->connecting))
{
return ela;
}
@@ -1687,13 +1687,15 @@
char *oldgroup = strtok(NULL,"\t");
char *newgroup = strtok(NULL,"\n");
eb_account *ea = NULL;
- if (action == MGMT_ADD || action == MGMT_MOV) {
- ea = find_account_by_handle(
- handle,
- ela->service_id);
- } else {
- continue; /* should re-create a
- dummy eb_account */
+ gboolean ea_recreated = TRUE;
+
+ ea = find_account_by_handle(handle,
+ ela->service_id);
+
+ if (!ea) {
+ ea_recreated = FALSE;
+ ea = dummy_account(handle, oldgroup,
+ ela->service_id);
}
if (action == MGMT_ADD && RUN_SERVICE(ea)->add_user) {
RUN_SERVICE(ea)->add_user(ea);
@@ -1706,7 +1708,19 @@
RUN_SERVICE(ea)->change_group(ea, newgroup);
strcpy(ea->account_contact->group->name,
realgrp);
}
-
+ if (action == MGMT_DEL && RUN_SERVICE(ea)->del_user) {
+ /* some services syncing lists have
+ automatically re-added our deleted
+ account */
+ if (ea_recreated) {
+ if
(g_list_length(ea->account_contact->accounts) == 1)
+
remove_contact(ea->account_contact);
+ else
+ remove_account(ea);
+ }
+ else
+ RUN_SERVICE(ea)->del_user(ea);
+ }
} else {
/* not for me */
fprintf(temp, "%s", buff_backup);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src account.c,1.8,1.9 account.h,1.5,1.6 util.c,1.16,1.17,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.161,1.162 configure.in,1.157,1.158
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.38,1.39
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.161,1.162 configure.in,1.157,1.158
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.38,1.39
- Index(es):