diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-09 16:49:56 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-09 18:11:48 +0100 |
commit | 6785ca65ab48f1a29914c1784a24009964ec4720 (patch) | |
tree | 31828a5eb1a646883c3f582795c8ffc7c990b35b /include/ouroboros/utils.h | |
parent | 275dc65b22e39654e4dfc9cbd13277e490c8dccd (diff) | |
download | ouroboros-6785ca65ab48f1a29914c1784a24009964ec4720.tar.gz ouroboros-6785ca65ab48f1a29914c1784a24009964ec4720.zip |
ipcpd, lib: Report IPCP creation failure
The IPCP will now respond with an ipcp_create_r message when it fails,
informing the IRMd.
Also adds some const qualifiers in the public headers and fixes
some formatting in dev.c.
Diffstat (limited to 'include/ouroboros/utils.h')
-rw-r--r-- | include/ouroboros/utils.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ouroboros/utils.h b/include/ouroboros/utils.h index 52873a7e..29fb4367 100644 --- a/include/ouroboros/utils.h +++ b/include/ouroboros/utils.h @@ -46,4 +46,14 @@ char * strdup(const char * src); /* gets the application name */ char * path_strip(char * src); +/* destroy a ** */ +#define freepp(type, ptr, len) \ + do { \ + if (len == 0) \ + break; \ + while (len > 0) \ + free(((type **) ptr)[--len]); \ + free(ptr); \ + } while (0); + #endif /* OUROBOROS_UTILS_H */ |