Mercurial > hg > quicktun
diff src/common.c @ 27:5ba185ca7102
Fixed error checking during initialization, restructured code a bit to make it even simpler
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Sat, 09 Apr 2011 17:36:48 +0200 |
parents | 38d495566d1c |
children | e77af6acb559 |
line wrap: on
line diff
--- a/src/common.c Fri Apr 08 17:08:04 2011 +0200 +++ b/src/common.c Sat Apr 09 17:36:48 2011 +0200 @@ -206,7 +206,7 @@ char protocol_data[p->protocol_data_size]; memset(protocol_data, 0, p->protocol_data_size); session.protocol_data = &protocol_data; - if (p->init) p->init(&session); + if (p->init && p->init(&session) < 0) return -1; fprintf(stderr, "The tunnel is now operational!\n");