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>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Only authenticates. This is useful to test your credentials (username and password).
|
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.
|
password and connection host at the command line.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -636,6 +636,9 @@ boolean xf_post_connect(freerdp* instance)
|
|||||||
cache = instance->context->cache;
|
cache = instance->context->cache;
|
||||||
channels = xfi->_context->channels;
|
channels = xfi->_context->channels;
|
||||||
|
|
||||||
|
if (instance->settings->authentication_only)
|
||||||
|
return true;
|
||||||
|
|
||||||
if (xf_get_pixmap_info(xfi) != true)
|
if (xf_get_pixmap_info(xfi) != true)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -976,6 +979,13 @@ int xfreerdp_run(freerdp* instance)
|
|||||||
if (!freerdp_connect(instance))
|
if (!freerdp_connect(instance))
|
||||||
return XF_EXIT_CONN_FAILED;
|
return XF_EXIT_CONN_FAILED;
|
||||||
|
|
||||||
|
if (instance->settings->authentication_only)
|
||||||
|
{
|
||||||
|
freerdp_disconnect(instance);
|
||||||
|
freerdp_free(instance);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
xfi = ((xfContext*) instance->context)->xfi;
|
xfi = ((xfContext*) instance->context)->xfi;
|
||||||
channels = instance->context->channels;
|
channels = instance->context->channels;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user