summaryrefslogtreecommitdiffhomepage
path: root/dbutil.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-03-21 16:20:59 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-03-21 16:20:59 +0000
commitf7caf6f5c640cb1756c01184898f176438a3a0c2 (patch)
tree4d32de11b18d5f6296207961b5f25d0949af80c0 /dbutil.h
parente444f0cfe67c71d3f38854f27cefae9aea6c4cd9 (diff)
parent3f49fc5f2ca0ec4adb5cac081f502cbb86702efa (diff)
propagate from branch 'au.asn.ucc.matt.dropbear' (head 0501e6f661b5415eb76f3b312d183c3adfbfb712)
to branch 'au.asn.ucc.matt.dropbear.cli-agent' (head 01038174ec27245b51bd43a66c01ad930880f67b) --HG-- branch : agent-client extra : convert_revision : 12b2f59db65e7339d340e95ac67d6d9ddb193c2b
Diffstat (limited to 'dbutil.h')
-rw-r--r--dbutil.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/dbutil.h b/dbutil.h
index 8f41fc6..8ad1188 100644
--- a/dbutil.h
+++ b/dbutil.h
@@ -39,6 +39,7 @@ extern void (*_dropbear_log)(int priority, const char* format, va_list param);
void dropbear_exit(const char* format, ...);
void dropbear_close(const char* format, ...);
void dropbear_log(int priority, const char* format, ...);
+void fail_assert(const char* expr, const char* file, int line);
#ifdef DEBUG_TRACE
void dropbear_trace(const char* format, ...);
void printhex(const char * label, const unsigned char * buf, int len);
@@ -57,7 +58,7 @@ char* getaddrhostname(struct sockaddr_storage * addr);
int buf_readfile(buffer* buf, const char* filename);
int buf_getline(buffer * line, FILE * authfile);
-int m_close(int fd);
+void m_close(int fd);
void * m_malloc(size_t size);
void * m_strdup(const char * str);
void * m_realloc(void* ptr, size_t size);
@@ -69,4 +70,7 @@ void setnonblocking(int fd);
/* Used to force mp_ints to be initialised */
#define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL}
+/* Dropbear assertion */
+#define dropbear_assert(X) do { if (!(X)) { fail_assert(#X, __FILE__, __LINE__); } } while (0)
+
#endif /* _DBUTIL_H_ */