Commit 7c1c10c4ae1b761161b82b1533d998dd696bc6a3

Authored by perry.werneck@gmail.com
1 parent 31e27945
Exists in master and in 1 other branch develop

Implementando novo mecanismo de conexao

Showing 1 changed file with 3 additions and 53 deletions   Show diff stats
widget.c
... ... @@ -1400,64 +1400,14 @@ int v3270_connect(GtkWidget *widget, const gchar *uri)
1400 1400  
1401 1401 terminal = GTK_V3270(widget);
1402 1402  
1403   -#ifdef DEBUG
1404 1403 if(uri)
1405 1404 {
1406   - LIB3270_CONNECT_OPTION opt = LIB3270_CONNECT_OPTION_DEFAULTS;
1407   - gchar * scheme = g_uri_unescape_string(uri,NULL);
1408   - gchar * hostname = strchr(scheme,':');
1409   - gchar * srvc;
1410   - gchar * query;
1411   -
1412   - if(hostname)
1413   - {
1414   - *(hostname++) = 0;
1415   -
1416   - while(*hostname && !g_ascii_isalnum(*hostname))
1417   - hostname++;
1418   -
1419   - if(*hostname)
1420   - {
1421   - if( ! (g_ascii_strcasecmp(scheme,"l") && g_ascii_strcasecmp(scheme,"ssl")) )
1422   - opt |= LIB3270_CONNECT_OPTION_SSL;
1423   -
1424   - srvc = strchr(hostname,':');
1425   - if(srvc)
1426   - {
1427   - *(srvc++) = 0;
1428   - query = strchr(srvc,'?');
1429   - if(query)
1430   - *(query++) = 0;
1431   - else
1432   - query = "";
1433   - }
1434   - else
1435   - {
1436   - srvc = "telnet";
1437   - }
1438   -
1439   - rc = lib3270_connect_host(terminal->host,hostname,srvc,opt);
1440   -
1441   - }
1442   -
1443   - }
1444   -
1445   -
1446   - g_free(scheme);
1447   -
1448   - }
1449   - else
1450   - {
1451   - rc = lib3270_connect(terminal->host,uri,0);
  1405 + trace("%s(%s)",__FUNCTION__,uri);
  1406 + lib3270_set_host(terminal->host,uri);
1452 1407 }
1453 1408  
1454   -#else
1455   - rc = lib3270_connect(terminal->host,uri,0);
1456   -#endif // DEBUG
1457   -
1458   - trace("%s exits with rc=%d (%s)",__FUNCTION__,rc,strerror(rc));
  1409 + return lib3270_connect(terminal->host,0);
1459 1410  
1460   - return rc;
1461 1411 }
1462 1412  
1463 1413 static gboolean notify_focus(GtkWidget *widget, GdkEventFocus *event)
... ...