For commanders in the field, hidden away somewhere in the Pentagon’s handbook of military strategy must be the warning: “In the middle of a war, don’t waste your time hanging out with reporters.”

Gen. Stanley McChrystal ignored that advice by granting unprecedented access to freelance journalist Michael Hastings, working on a story for Rolling Stone, after the Icelandic volcano stranded them both in Europe. The two bonded so well that, once flights resumed, a naive or media-hungry McChrystal invited Hastings to accompany him back to Afghanistan – where Hastings was allowed to spend another full month with the commanding general and his staff, recording their every irreverent comment. What was McChrystal thinking?

It was a McChrystal staffer who mocked Vice President Biden as Joe “Bite Me.” And another who called National Security Adviser James Jones “a clown.” But it was McChrystal himself who disparaged his commander in chief, describing Obama as intimidated by Pentagon generals, confused, unfocused and wasting his time in the Oval Office with a 10-minute “photo op.”

Those comments cost McChrystal his job, and rightfully so. President Obama had no choice but to fire McChrystal – because he not only spoke out of turn, he also violated the sacred chain of command on which military discipline depends, and without which it would be impossible to conduct the war in Afghanistan or any other war.

The problem with firing McChrystal, however, is that it was too easy – and doesn’t fix the real problem. America’s real problem in Afghanistan is not a general with foot-in-mouth disease; it’s a war, now in its ninth year, that drags on and on with little sign of progress.

Last year, ignoring the advice of Vice President Biden and others to scale back operations in Afghanistan, President Obama instead embraced the counterinsurgency strategy designed by Gens. McChrystal and Petraeus. To carry it out, he ordered another 30,000 troops to Afghanistan. Today, it’s clear that Obama’s “surge” is not working. Indeed, the most devastating comments in Hastings’ Rolling Stone article are not the insults tossed toward Washington by McChrystal and his aides. They’re the words of despair uttered by soldiers in the field, who believe that the rules of engagement in Afghanistan, under Obama’s counterinsurgency plan, are so strict that they prevent troops from doing their job. “Sir, some of the guys here, sir, think we’re losing, sir,” one soldier tells McChrystal.

The truth is, we may not be losing in Afghanistan, but we’re not winning, either. In February, American forces launched an offensive in Marjah. It was billed as a quick, demonstrative test of the success of the counterinsurgency program: to move into an area, rout the Taliban, live among and make friends with the villagers, then withdraw, leaving them in peace and in charge. And Gen. McChrystal planned it as a warm-up for the mother of all counterinsurgency operations, in Kandahar, birthplace of the Taliban.

But things didn’t quite work out that way. Five months later, the operation in Marjah drags on. Instead of staying to make new friends, many native villagers deserted the area once American troops moved in. Meanwhile, the Taliban stayed behind, went underground and still launch daily, deadly attacks against American forces. Things are so bad in Marjah that McChrystal himself called it a “bleeding ulcer.” And the planned offensive in Kandahar, expected to be completed before the holy month of Ramadan in August, has been indefinitely postponed.

So it would be a big mistake to believe that, by making a necessary change in leadership in Afghanistan, President Obama has brought us any closer to victory. That is simply not the case.

Equally mistaken is the belief that the same strategy that worked in Iraq will work in Afghanistan. Wrong! They are two different countries, with two different histories. Iraq has long had a strong, central government, however brutal or corrupt. Afghanistan has never had one, for centuries – and it’s not about to embrace one now.

So the success of our mission in Afghanistan remains very much in doubt. Yes, a new man’s in charge. That’s the good news. But the same old counterinsurgency policy is in place. That’s the bad news.

In David Petraeus, President Obama has the right man in Afghanistan. Now he must give him the right assignment – which is not to figure out how to win in Afghanistan, but how to get the hell out of there.

Note: Read our discussion guidelines before commenting.