/// A class describing a MeshLink mesh.
class mesh: public meshlink_handle_t {
public:
- mesh() {}
+ mesh() : meshlink_handle_t() {}
virtual ~mesh() {
meshlink_close(this);
#ifndef MESHLINK_INTERNAL_H
struct meshlink_handle {
- const char *name;
+ char *name;
char *appname;
dev_class_t devclass;
void *priv;
};
struct meshlink_node {
- const char *name; ///< Textual name of this node. It is stored in a nul-terminated C string, which is allocated by MeshLink.
+ char *name; ///< Textual name of this node. It is stored in a nul-terminated C string, which is allocated by MeshLink.
void *priv; ///< Private pointer which may be set freely by the application, and is never used or modified by MeshLink.
};
{
logger(mesh, MESHLINK_INFO, "* found best one for initial connect");
- timeout = 0;
+ //timeout = 0;
connect_to = (node_t*)nodes->head->data;
}
{
logger(mesh, MESHLINK_INFO, "* disconnect connection (too many connections");
- timeout = 0;
+ //timeout = 0;
disconnect_from = (node_t*)nodes->head->data;
}
typedef struct node_t {
char *name; /* name of this node */
+ void *priv;
+
uint32_t options; /* options turned on for this node */
dev_class_t devclass;