From: Pekka Riikonen Date: Wed, 14 Feb 2007 14:45:07 +0000 (+0000) Subject: Return socket info in different order. X-Git-Tag: silc.client.1.1.beta1~22 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=e6e5104eab3b01258d34984826a97e4b29724136 Return socket info in different order. --- diff --git a/lib/silcutil/silcsocketstream.c b/lib/silcutil/silcsocketstream.c index a617f45c..0cd45ce2 100644 --- a/lib/silcutil/silcsocketstream.c +++ b/lib/silcutil/silcsocketstream.c @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2005 - 2006 Pekka Riikonen + Copyright (C) 2005 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -261,20 +261,20 @@ SilcBool silc_socket_stream_get_info(SilcStream stream, if (sock) *sock = socket_stream->sock; - if (hostname) { - if (!socket_stream->hostname) + if (port) { + if (!socket_stream->port) return FALSE; - *hostname = socket_stream->hostname; + *port = socket_stream->port; } if (ip) { if (!socket_stream->ip) return FALSE; *ip = socket_stream->ip; } - if (port) { - if (!socket_stream->port) + if (hostname) { + if (!socket_stream->hostname) return FALSE; - *port = socket_stream->port; + *hostname = socket_stream->hostname; } return TRUE;