51 |
|
{ |
52 |
|
void authenticate(const char* srv, const char* shr, char* wg, int wglen, char* un, int unlen, char* pw, int pwlen) |
53 |
|
{ |
54 |
< |
static ext::String user("Douglas Thrift"), password(::getpass("Password:")); |
54 |
> |
static ext::Buffer user("Douglas Thrift"), password(::getpass("Password:")); |
55 |
|
|
56 |
< |
_foreach (ext::String, atom, user) |
56 |
> |
_foreach (ext::Buffer, atom, user) |
57 |
|
un[_index] = *atom; |
58 |
< |
_foreach (ext::String, atom, password) |
58 |
> |
_foreach (ext::Buffer, atom, password) |
59 |
|
pw[_index] = *atom; |
60 |
|
|
61 |
|
un[user.GetSize() < size_t(unlen) ? user.GetSize() : unlen - 1] = '\0'; |