I forgot to add this in my previous post.
There could be a reason why Putin helped Erdogan or informed him about the coup in advance. Come to think of it, right now Turkey is one of the main contributors to NATO.
Russia has lots of reasons to help Erdogan, one being NATO and second, his deadlock with West.
I heard that your deputy PM Simsek (?) went out of his way to thank Russia for supporting Erdogan during the failed coup. So, its possible that after the recent turn of events Erdogan might rethink on his international partnerships.
Anyways, lets see how Erdogan and Putin's meeting on Aug 9th turns out to be.
My personal opinion is that Russia and Turkey can solve the Syria issue among themselves.
@T-123456