ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.9,1.10


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.9,1.10
Date: Sat, 04 Jan 2003 16:24:28 -0500

Update of /cvsroot/ayttm/ayttm/modules/msn2
In directory subversions:/tmp/cvs-serv5005/modules/msn2

Modified Files:
        msn.C 
Log Message:
        * src/add_contact_window.[ch]
                new get_all_accounts(int serviceid) function
        * modules/msn2/msn.C
          modules/msn2/msn_core.[Ch]
                Everything ready to automatically re-add 
                existing contacts to FL and AL if necessary
                - disabled for now but not for long



Index: msn.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/msn.C,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- msn.C       4 Jan 2003 19:54:51 -0000       1.9
+++ msn.C       4 Jan 2003 21:24:26 -0000       1.10
@@ -68,7 +68,7 @@
 #include "browser.h"
 #include "smileys.h"
 #include "file_select.h"
-
+#include "add_contact_window.h"
 #include <glib.h>
 #ifdef __MINGW32__
 #define snprintf g_snprintf
@@ -1299,7 +1299,7 @@
   { strncpy(fname_pref, friendlyname, MAX_PREF_LEN); }
   
   if(!ela->connected) {
-         printf("not connected, shouldn't get it\n");
+         eb_debug(DBG_MOD,"not connected, shouldn't get it\n");
          ela->connected = 1;
          close_conn(conn);
          msn_clean_up(conn);
@@ -1309,8 +1309,20 @@
 
 void ext_got_info(msnconn * conn, syncinfo * info)
 {
+  GList *existing = get_all_accounts(SERVICE_INFO.protocol_id);
   eb_debug(DBG_MOD, "Got the sync info!\n");
   msn_set_state(conn, "NLN");
+    for(existing; existing != NULL && existing->data != NULL; existing = 
existing->next) {
+           char *cnt = (char*) existing->data;
+           if (!is_on_list(cnt,info->al)) {
+                   eb_debug(DBG_MOD,"adding %s to al\n",cnt);
+               //msn_add_to_list(mainconn, "AL", account->handle);
+           }
+           if (!is_on_list(cnt,info->fl)) {
+                   eb_debug(DBG_MOD,"adding %s to fl\n",cnt);
+               //msn_add_to_list(mainconn, "FL", account->handle);
+           }
+    }
 
  if(fname_pref[0]!='\0')
  { msn_set_friendlyname(conn, fname_pref); }
@@ -1705,12 +1717,11 @@
 void ext_new_connection(msnconn * conn)
 {
   if(conn->type==CONN_NS)
-  {
+  { 
     // Were's connected to a NS, so lets sync the list.
     // Currently, no caching implemented (*thinks to self - how about 
$HOME/.everybuddy/contacts?*)
     // ---vance
     msn_sync_lists(conn, 0);
-
   }
 }
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]