summaryrefslogtreecommitdiffstats
path: root/gss-misc.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-06-27 12:52:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-06-27 12:52:45 +0200
commit3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2 (patch)
treea147c4dbda59de0675b0c2a5e80a2b6f97569691 /gss-misc.c
parentd4518082362afebef9400bcbf46e38228de83bf1 (diff)
downloadrsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.zip
rsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.tar.gz
rsyslog-3f6c73a8b7ff2c6d9c931876d823f2b4ef6bbea2.tar.xz
added (internal) error codes to error messages
Also added redirector to web description of error codes closes bug http://bugzilla.adiscon.com/show_bug.cgi?id=20
Diffstat (limited to 'gss-misc.c')
-rw-r--r--gss-misc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gss-misc.c b/gss-misc.c
index 4f0df74..c922059 100644
--- a/gss-misc.c
+++ b/gss-misc.c
@@ -66,13 +66,13 @@ static void display_status_(char *m, OM_uint32 code, int type)
do {
maj_stat = gss_display_status(&min_stat, code, type, GSS_C_NO_OID, &msg_ctx, &msg);
if (maj_stat != GSS_S_COMPLETE) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error in gss_display_status called from <%s>\n", m);
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error in gss_display_status called from <%s>\n", m);
break;
} else {
char buf[1024];
snprintf(buf, sizeof(buf), "GSS-API error %s: %s\n", m, (char *) msg.value);
buf[sizeof(buf)/sizeof(char) - 1] = '\0';
- errmsg.LogError(NO_ERRCODE, "%s", buf);
+ errmsg.LogError(0, NO_ERRCODE, "%s", buf);
}
if (msg.length != 0)
gss_release_buffer(&min_stat, &msg);
@@ -162,12 +162,12 @@ static int recv_token(int s, gss_buffer_t tok)
ret = read_all(s, (char *) lenbuf, 4);
if (ret < 0) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error reading token length");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error reading token length");
return -1;
} else if (!ret) {
return 0;
} else if (ret != 4) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error reading token length");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error reading token length");
return -1;
}
@@ -179,17 +179,17 @@ static int recv_token(int s, gss_buffer_t tok)
tok->value = (char *) malloc(tok->length ? tok->length : 1);
if (tok->length && tok->value == NULL) {
- errmsg.LogError(NO_ERRCODE, "Out of memory allocating token data\n");
+ errmsg.LogError(0, NO_ERRCODE, "Out of memory allocating token data\n");
return -1;
}
ret = read_all(s, (char *) tok->value, tok->length);
if (ret < 0) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error reading token data");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error reading token data");
free(tok->value);
return -1;
} else if (ret != (int) tok->length) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error reading token data");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error reading token data");
free(tok->value);
return -1;
}
@@ -214,19 +214,19 @@ static int send_token(int s, gss_buffer_t tok)
ret = write_all(s, (char *) lenbuf, 4);
if (ret < 0) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error sending token length");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error sending token length");
return -1;
} else if (ret != 4) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error sending token length");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error sending token length");
return -1;
}
ret = write_all(s, tok->value, tok->length);
if (ret < 0) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error sending token data");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error sending token data");
return -1;
} else if (ret != (int) tok->length) {
- errmsg.LogError(NO_ERRCODE, "GSS-API error sending token data");
+ errmsg.LogError(0, NO_ERRCODE, "GSS-API error sending token data");
return -1;
}