Commit eb3be11e369762123b9af7700da088c4fd6fea7b

Authored by Perry Werneck
1 parent c30d0b36
Exists in master and in 1 other branch develop

Fixing case problem on session name.

client/src/session/remote/linux/session.cc
... ... @@ -80,17 +80,22 @@
80 80 throw std::system_error(EINVAL, std::system_category());
81 81 }
82 82  
  83 + string name(id,sep-id);
  84 + std::transform(name.begin(), name.end(), name.begin(),[](unsigned char c){ return std::tolower(c); });
  85 +
  86 + string path(sep+1);
  87 + std::transform(path.begin(), path.end(), path.begin(),[](unsigned char c){ return std::tolower(c); });
  88 +
83 89 this->name = "br.com.bb.";
84   - this->name += string(id,(sep - id));
  90 + this->name += name;
85 91 this->name += ".";
86   - this->name += (sep+1);
  92 + this->name += path;
87 93  
88   - std::transform(this->name.begin(), this->name.end(), this->name.begin(),[](unsigned char c){ return std::tolower(c); });
89 94  
90 95 this->path = "/br/com/bb/";
91   - this->path += string(id,(sep - id));
  96 + this->path += name;
92 97 this->path += "/";
93   - this->path += (sep+1);
  98 + this->path += path;
94 99  
95 100 this->interface = "br.com.bb.tn3270.session";
96 101  
... ...
client/src/testprogram/testprogram.cc
... ... @@ -177,7 +177,7 @@
177 177  
178 178 int main(int argc, char **argv) {
179 179  
180   - const char * session = ":a";
  180 + const char * session = ":A";
181 181  
182 182 #ifndef _WIN32
183 183 #pragma GCC diagnostic push
... ...