[Commotion-admin] [olsrd] Converted olsrd-mdp to use commotiond/serval-plugin (#15)

Dan Staples notifications at github.com
Thu Dec 19 14:14:30 UTC 2013


> @@ -85,7 +88,17 @@
>  #define OS "Undefined"
>  #endif /* OS */
>  
> +#define CLEAN_ERRNO() (errno == 0 ? "None" : strerror(errno))
> +#define ERROR(M, ...) olsr_printf(1, "(%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, CLEAN_ERRNO(), ##__VA_ARGS__)
> +#define CHECK(A, M, ...) if(!(A)) { ERROR(M, ##__VA_ARGS__); errno=0; goto error; }
> +#define CHECKF(A, M, ...) if(!(A)) { ERROR(M, ##__VA_ARGS__); exit(1); }
> +#define CHECK_MEM(A) CHECK((A), "Out of memory.")
> +#define CHECKF_MEM(A) CHECKF((A), "Out of memory.")
> +#define CO_APPEND_STR(R,S) CHECKF(co_request_append_str(co_req,S,strlen(S)+1),"Failed to append to request")
> +#define CO_APPEND_BIN(R,S,L) CHECK(co_request_append_bin(co_req,(char*)S,L),"Failed to append to request")
> +

yes probably :)

---
Reply to this email directly or view it on GitHub:
https://github.com/opentechinstitute/olsrd/pull/15/files#r8469806
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chambana.net/pipermail/commotion-admin/attachments/20131219/2ab5dd31/attachment.html>


More information about the Commotion-admin mailing list