mirror of https://github.com/FreeRDP/FreeRDP
xfreerdp: fixed crash with --authonly
Also updated documentation: --authonly returns 0 on success and != 0 if an error occurs. fixes #843
This commit is contained in:
parent
9f648ca29f
commit
7d4526a874
|
@ -300,7 +300,7 @@
|
|||
<listitem>
|
||||
<para>
|
||||
Only authenticates. This is useful to test your credentials (username and password).
|
||||
Returns status code 0 if the client can connect, 1 otherwise. Requires a username,
|
||||
Returns status code 0 if the client can connect. Requires a username,
|
||||
password and connection host at the command line.
|
||||
</para>
|
||||
</listitem>
|
||||
|
|
|
@ -636,6 +636,9 @@ boolean xf_post_connect(freerdp* instance)
|
|||
cache = instance->context->cache;
|
||||
channels = xfi->_context->channels;
|
||||
|
||||
if (instance->settings->authentication_only)
|
||||
return true;
|
||||
|
||||
if (xf_get_pixmap_info(xfi) != true)
|
||||
return false;
|
||||
|
||||
|
@ -976,6 +979,13 @@ int xfreerdp_run(freerdp* instance)
|
|||
if (!freerdp_connect(instance))
|
||||
return XF_EXIT_CONN_FAILED;
|
||||
|
||||
if (instance->settings->authentication_only)
|
||||
{
|
||||
freerdp_disconnect(instance);
|
||||
freerdp_free(instance);
|
||||
return ret;
|
||||
}
|
||||
|
||||
xfi = ((xfContext*) instance->context)->xfi;
|
||||
channels = instance->context->channels;
|
||||
|
||||
|
|
Loading…
Reference in New Issue