git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1da0f53
)
better error/special situation handling in recv_token()
author
Miloš Mulač
<mulac@civ.zcu.cz>
Wed, 11 Oct 2006 14:29:13 +0000
(14:29 +0000)
committer
Miloš Mulač
<mulac@civ.zcu.cz>
Wed, 11 Oct 2006 14:29:13 +0000
(14:29 +0000)
- prevent some rare-but-hard-to-catch errors
org.glite.security.gsoap-plugin/src/glite_gss.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.security.gsoap-plugin/src/glite_gss.c
b/org.glite.security.gsoap-plugin/src/glite_gss.c
index
e13a63d
..
eda6021
100644
(file)
--- a/
org.glite.security.gsoap-plugin/src/glite_gss.c
+++ b/
org.glite.security.gsoap-plugin/src/glite_gss.c
@@
-366,8
+366,12
@@
recv_token(int sock, void **token, size_t *token_length, struct timeval *to)
goto end;
}
}
- if (count == 0 && tl == 0 && errno == 0)
- return EDG_WLL_GSS_ERROR_EOF;
+
+ if (count==0) {
+ if (tl==0)
+ return EDG_WLL_GSS_ERROR_EOF;
+ else goto end;
+ }
tmp=realloc(t, tl + count);
if (tmp == NULL) {
errno = ENOMEM;
@@
-832,6
+836,7
@@
edg_wll_gss_read(edg_wll_GssConnection *connection, void *buf, size_t bufsize,
/* XXX cleanup */
return ret;
+
maj_stat = gss_unwrap(&min_stat, connection->context, &input_token,
&output_token, NULL, NULL);
gss_release_buffer(&min_stat, &input_token);