Commit 31b5435710d08dabe935c124bdd5ba6821fb8e9c
1 parent
9baca4ee
Exists in
master
and in
3 other branches
Incluindo método para obter a URL do host
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
host.c
... | ... | @@ -219,6 +219,19 @@ static void update_host(H3270 *h) |
219 | 219 | |
220 | 220 | } |
221 | 221 | |
222 | +LIB3270_EXPORT const char * lib3270_get_url(H3270 *h, char *buffer, int len) | |
223 | +{ | |
224 | + CHECK_SESSION_HANDLE(h); | |
225 | + | |
226 | + snprintf(buffer,len,"%s://%s:%s", | |
227 | + ((h->options & LIB3270_OPTION_SSL) == 0) ? "tn3270" : "tn3270s", | |
228 | + h->host.current, | |
229 | + h->host.srvc | |
230 | + ); | |
231 | + | |
232 | + return buffer; | |
233 | +} | |
234 | + | |
222 | 235 | LIB3270_EXPORT const char * lib3270_set_url(H3270 *h, const char *n) |
223 | 236 | { |
224 | 237 | CHECK_SESSION_HANDLE(h); | ... | ... |