projects
/
crypto.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d2d17c1
)
Better error messages.
author
Pekka Riikonen
<priikone@silcnet.org>
Tue, 6 Nov 2007 10:18:17 +0000
(10:18 +0000)
committer
Pekka Riikonen
<priikone@silcnet.org>
Tue, 6 Nov 2007 10:18:17 +0000
(10:18 +0000)
lib/silcapputil/silcapputil.c
patch
|
blob
|
history
diff --git
a/lib/silcapputil/silcapputil.c
b/lib/silcapputil/silcapputil.c
index abd82dc30d86c03295ac5778e77cec773d40a24b..157cce57b3ed3261c0b795bdf850a3f987f2fa43 100644
(file)
--- a/
lib/silcapputil/silcapputil.c
+++ b/
lib/silcapputil/silcapputil.c
@@
-31,13
+31,17
@@
static char *silc_create_pk_identifier(void)
/* Get hostname */
hostname = silc_net_localhost();
/* Get hostname */
hostname = silc_net_localhost();
- if (!hostname)
+ if (!hostname) {
+ fprintf(stderr, "Could not resolve local hostname/IP address");
return NULL;
return NULL;
+ }
/* Get username (mandatory) */
username = silc_get_username();
/* Get username (mandatory) */
username = silc_get_username();
- if (!username)
+ if (!username) {
+ fprintf(stderr, "Could not determine username");
return NULL;
return NULL;
+ }
/* Create default email address, whether it is right or not */
silc_snprintf(email, sizeof(email), "%s@%s", username, hostname);
/* Create default email address, whether it is right or not */
silc_snprintf(email, sizeof(email), "%s@%s", username, hostname);
@@
-136,8
+140,7
@@
New pair of keys will be created. Please, answer to following questions.\n\
}
} else {
if (!def) {
}
} else {
if (!def) {
- fprintf(stderr, "Could not create public key identifier: %s\n",
- strerror(errno));
+ fprintf(stderr, "Could not create public key identifier\n");
return FALSE;
}
identifier = strdup(def);
return FALSE;
}
identifier = strdup(def);