Added code to process a sync or fullsync response from the server