View | Details | Raw Unified | Return to bug 55560
Collapse All | Expand All

(-)kio/misc/ktelnetservice.cpp (-2 / +11 lines)
Lines 68-77 int main(int argc, char **argv) Link Here
68
		cmd << url.user();
68
		cmd << url.user();
69
	}
69
	}
70
70
71
        QString host;
71
        if (!url.host().isEmpty())
72
        if (!url.host().isEmpty())
72
           cmd << url.host(); // telnet://host
73
           host = url.host(); // telnet://host
73
        else if (!url.path().isEmpty())
74
        else if (!url.path().isEmpty())
74
           cmd << url.path(); // telnet:host
75
           host = url.path(); // telnet:host
76
77
        if (host.isEmpty() || host.startsWith("-"))
78
        {
79
            kdError() << "Invalid hostname " << host << endl;
80
            return 2;
81
        }
82
83
        cmd << host;
75
        
84
        
76
	if (url.port())
85
	if (url.port())
77
		cmd << QString::number(url.port());
86
		cmd << QString::number(url.port());

Return to bug 55560