summaryrefslogtreecommitdiff
path: root/lib/examples/client-blocking.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/examples/client-blocking.c')
-rw-r--r--lib/examples/client-blocking.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/examples/client-blocking.c b/lib/examples/client-blocking.c
index 7d3869a..7ba71a0 100644
--- a/lib/examples/client-blocking.c
+++ b/lib/examples/client-blocking.c
@@ -25,12 +25,13 @@ blocking_client (const char *config_fn, const char *configuration,
struct rs_request *request = NULL;
struct rs_packet *req = NULL, *resp = NULL;
struct rs_error *err = NULL;
+ int r;
- if (rs_context_create (&h))
+ r = rs_context_create (&h);
+ if (r)
{
- err = err_create (RSE_INTERNAL, NULL, 0, "unable to create context");
- assert (err != NULL);
- return err;
+ assert(r == RSE_NOMEM);
+ assert (!"out of RAM -- unable to create libradsec context");
}
#if !defined (USE_CONFIG_FILE)