update m_log
diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index 754c995..1d83fc6 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -55,6 +55,7 @@
   stringstream ss(dataBuffer);
 
   const LeafContainer &fullLc = m_state.getLeaves();
+  DiffStatePtr diffLog = make_shared<DiffState>();
 
   if (last == "state")
   {
@@ -75,6 +76,7 @@
 	prefix += seq.getSession();
 	m_fetch(prefix, 1, seq.getSeq());
 	m_state.update(pInfo, seq);
+	diffLog->update(pInfo, seq);
       }
       else
       {
@@ -91,6 +93,7 @@
 	    m_fetch(prefix, 1, seq.getSeq());
 
 	  m_state.update(pInfo, seq);
+	  diffLog->update(pInfo, seq);
 	}
       }
     }
@@ -118,6 +121,7 @@
 
 	    NameInfoConstPtr pInfo = StdNameInfo::FindOrCreate(info.toString());
 	    m_state.update(pInfo, seq);
+	    diffLog->update(pInfo, seq);
 	  }
 	  else
 	  {
@@ -135,6 +139,7 @@
 
 	      NameInfoConstPtr pInfo = StdNameInfo::FindOrCreate(info.toString());
 	      m_state.update(pInfo, seq);
+	      diffLog->update(pInfo, seq);
 	    }
 	  }
 	  break;
@@ -144,6 +149,7 @@
 	  {
 	    NameInfoConstPtr pInfo = StdNameInfo::FindOrCreate(info.toString());
   	    m_state.remove(pInfo);
+	    diffLog->remove(pInfo);
 	  }
 	  break;
 
@@ -153,6 +159,7 @@
     }
   }
 
+  m_log.insert(diffLog);
   sendSyncInterest();
 }
 
@@ -165,6 +172,7 @@
   diff->update(info, seqN);
   m_state.update(info, seqN);
   diff->setDigest(m_state.getDigest());
+  m_log.insert(diff);
 
   vector<string> pis = m_syncInterestTable.fetchAll();
   stringstream ss;
@@ -190,7 +198,7 @@
   }
 
   DiffStateContainer::iterator ii = m_log.find (digest);
-  
+
   if (ii != m_log.end())
   {
     stringstream ss;
@@ -202,7 +210,7 @@
     int wait = rand() % 80 + 20;
     sleep(wait/1000.0); // ??? sleep in this thread???
   }
-  
+
   if (*m_state.getDigest() == *digest)
   {
     m_syncInterestTable.insert(interest);