projects
/
radsecproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4f20d3
)
Handle failing rs_context_create().
author
Linus Nordberg
<linus@nordu.net>
Thu, 26 Apr 2012 08:17:24 +0000
(10:17 +0200)
committer
Linus Nordberg
<linus@nordu.net>
Thu, 26 Apr 2012 08:17:24 +0000
(10:17 +0200)
lib/examples/client-blocking.c
patch
|
blob
|
history
diff --git
a/lib/examples/client-blocking.c
b/lib/examples/client-blocking.c
index
73c526d
..
f26cd6c
100644
(file)
--- a/
lib/examples/client-blocking.c
+++ b/
lib/examples/client-blocking.c
@@
-4,10
+4,12
@@
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
+#include <assert.h>
#include <event2/event.h>
#include <freeradius/libradius.h>
#include <radsec/radsec.h>
#include <radsec/request.h>
#include <event2/event.h>
#include <freeradius/libradius.h>
#include <radsec/radsec.h>
#include <radsec/request.h>
+#include "err.h"
#include "debug.h" /* For rs_dump_packet(). */
#define SECRET "sikrit"
#include "debug.h" /* For rs_dump_packet(). */
#define SECRET "sikrit"
@@
-25,7
+27,11
@@
blocking_client (const char *config_fn, const char *configuration,
struct rs_error *err = NULL;
if (rs_context_create (&h))
struct rs_error *err = NULL;
if (rs_context_create (&h))
- return NULL;
+ {
+ err = err_create (RSE_INTERNAL, NULL, 0, "unable to create context");
+ assert (err != NULL);
+ return err;
+ }
#if !defined (USE_CONFIG_FILE)
{
#if !defined (USE_CONFIG_FILE)
{