Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
a69d49dc
Commit
a69d49dc
authored
Sep 15, 1998
by
Niels Möller
Browse files
Better error messages.
Rev: src/lsh.c:1.8 Rev: src/lshd.c:1.5
parent
1a59667e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lsh.c
View file @
a69d49dc
...
...
@@ -23,8 +23,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include
<
stdi
o.h>
#include
<
errn
o.h>
#include
<locale.h>
#include
<stdio.h>
#include
<string.h>
#include
"getopt.h"
...
...
@@ -93,13 +95,17 @@ int main(int argc, char **argv)
random_seed
=
ssh_format
(
"%z"
,
"gazonk"
);
io_connect
(
&
backend
,
&
remote
,
NULL
,
make_client_callback
(
&
backend
,
"lsh - a free ssh"
,
BLOCK_SIZE
,
make_poor_random
(
&
sha_algorithm
,
random_seed
)));
if
(
!
io_connect
(
&
backend
,
&
remote
,
NULL
,
make_client_callback
(
&
backend
,
"lsh - a free ssh"
,
BLOCK_SIZE
,
make_poor_random
(
&
sha_algorithm
,
random_seed
))))
{
werror
(
"lsh: Connection failed: %s
\n
"
,
strerror
(
errno
));
return
1
;
}
lsh_string_free
(
random_seed
);
io_run
(
&
backend
);
...
...
src/lshd.c
View file @
a69d49dc
...
...
@@ -22,9 +22,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
<
#include
<
stdi
o.h>
#include
<
errn
o.h>
#include
<locale.h>
#include
<stdio.h>
#include
<string.h>
#include
"getopt.h"
...
...
@@ -87,10 +89,14 @@ int main(int argc, char **argv)
exit
(
1
);
}
io_listen
(
&
backend
,
&
local
,
if
(
!
io_listen
(
&
backend
,
&
local
,
make_server_callback
(
&
backend
,
"lsh - a free ssh"
,
BLOCK_SIZE
));
BLOCK_SIZE
)))
{
werror
(
"lsh: Connection failed: %s
\n
"
,
strerror
(
errno
));
return
1
;
}
io_run
(
&
backend
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment