MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_GSS_error_int

Function pg_GSS_error_int

src/interfaces/libpq/fe-gssapi-common.c:32–48  ·  view source on GitHub ↗

* Fetch all errors of a specific type and append to "str". * Each error string is preceded by a space. */

Source from the content-addressed store, hash-verified

30 * Each error string is preceded by a space.
31 */
32static void
33pg_GSS_error_int(PQExpBuffer str, OM_uint32 stat, int type)
34{
35 OM_uint32 lmin_s;
36 gss_buffer_desc lmsg;
37 OM_uint32 msg_ctx = 0;
38
39 do
40 {
41 if (gss_display_status(&lmin_s, stat, type, GSS_C_NO_OID,
42 &msg_ctx, &lmsg) != GSS_S_COMPLETE)
43 break;
44 appendPQExpBufferChar(str, ' ');
45 appendBinaryPQExpBuffer(str, lmsg.value, lmsg.length);
46 gss_release_buffer(&lmin_s, &lmsg);
47 } while (msg_ctx);
48}
49
50/*
51 * GSSAPI errors contain two parts; put both into conn->errorMessage.

Callers 1

pg_GSS_errorFunction · 0.70

Calls 2

appendPQExpBufferCharFunction · 0.85
appendBinaryPQExpBufferFunction · 0.85

Tested by

no test coverage detected