Rebuilding M-Bus context structs in progress

- changed local library file includes from <> to ""
- get rid of 'if (is_serial)' conditions
- mbus_context_serial() and mbus_context_tcp() allocates memory and initialize context specific function pointers
- simply mbus_connect() called instead of mbus_connect_tcp() or mbus_connect_serial()
- context specific data can still be accessed via (void* auxdata) pointer
- strdup(3) to copy host IP into TCP context struct
This commit is contained in:
jakubovsky
2012-07-04 17:18:36 +02:00
parent 9f9e0fc008
commit c848090f56
8 changed files with 223 additions and 212 deletions

2
mbus/mbus-protocol.c Normal file → Executable file
View File

@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>
#include <mbus/mbus-protocol.h>
#include "mbus-protocol.h"
static int parse_debug = 0, debug = 0;
static char error_str[512];