fix: Login uri was impossible to change
This commit is contained in:
@@ -594,17 +594,17 @@ void ShowCommandsToolbar()
|
||||
// login window
|
||||
class GetHTTPContent: public HTTPCallback {
|
||||
public:
|
||||
GetHTTPContent(const std::string &uri): uri{uri} {
|
||||
GetHTTPContent() {
|
||||
this->proccessing = false;
|
||||
this->buf_last = lastof(buf);
|
||||
}
|
||||
bool proccessing = false;
|
||||
|
||||
void InitiateLoginSequence() {
|
||||
void InitiateLoginSequence(const std::string& uri) {
|
||||
if(this->proccessing) return;
|
||||
this->proccessing = true;
|
||||
this->cursor = this->buf;
|
||||
NetworkHTTPSocketHandler::Connect(this->uri, this);
|
||||
NetworkHTTPSocketHandler::Connect(uri, this);
|
||||
}
|
||||
|
||||
void OnReceiveData(std::unique_ptr<char[]> data, size_t length) override {
|
||||
@@ -642,7 +642,6 @@ private:
|
||||
char buf[HTTPBUFLEN];
|
||||
char *buf_last;
|
||||
char *cursor;
|
||||
std::string uri;
|
||||
};
|
||||
|
||||
std::string urlencode(const std::string &s) {
|
||||
@@ -692,8 +691,9 @@ void AccountLogin(CommunityName community){
|
||||
default:
|
||||
return;
|
||||
}
|
||||
static GetHTTPContent login(uri);
|
||||
login.InitiateLoginSequence();
|
||||
|
||||
static GetHTTPContent login{};
|
||||
login.InitiateLoginSequence(uri);
|
||||
}
|
||||
|
||||
//login window
|
||||
|
||||
Reference in New Issue
Block a user