* Update station name parser iaw new METAR format
pull/1/head
David Freese 2013-04-09 09:07:51 -05:00
rodzic 6e5a68d01f
commit 69bab6971c
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -238,13 +238,14 @@ void getwx(string& wx, const char *metar)
LOG_WARN("%s", "station not found\n");
return;
}
const char *eoh = "Connection: close";
const char *eoh = "Content-Type:";
p1 = text.find(eoh);
if (p1 != string::npos) {
text.erase(0, p1 + strlen(eoh) + 4);
p1 = text.find("\n",p1);
text.erase(0, p1);
while (text[0] == '\r' || text[0] == '\n') text.erase(0,1);
p1 = text.find("\n");
if (p1 != string::npos)
name = text.substr(0, p1);
name = text.substr(0, p1);
}
p3 = text.find("ob:");