The following commit has been merged in the master branch:
commit 9cd7382f815fbebe25381d5ad5da4cd5074f20cc
Author: Elektra Wagenrad <onelektra(a)gmx.net>
Date: Tue Dec 6 20:44:19 2011 +0100
Users or build servers may want to enable preprocessor specific options like
-D_FORTIFY_SOURCE=2 that are usually placed in CPPFLAGS. The batmand makefile
should not override these options to add own preprocessor variables.
Issued by: Sven Eckelmann <sven(a)narfation.org>
Signed off by Elektra Wagenrad <onelektra(a)gmx.net>
diff --git a/Makefile b/Makefile
index 346b14a..65e0cf2 100755
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ MANPAGE = man/batmand.8
# batmand flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -MD
-CPPFLAGS = -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING)
+CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DPROFILE_DATA $(NO_POLICY_ROUTING)
LDLIBS += -lpthread
# disable verbose output
--
batmand
The following commit has been merged in the merge/master branch:
commit 0fa214b2307ec8df272bb16c66248b3f1a3e4c84
Merge: d10c9a39f7d9b8e0de60e6e6897c5d3ecf60e9e1 dc96f5b62bfbac7ea0a5f53ed9795ad262daad91
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Wed Dec 7 02:23:04 2011 +0800
Merge remote-tracking branch 'origin/standalone/next' into merge/master
diff --combined net/batman-adv/gateway_client.c
index 9373a14,24403a7..24403a7
--- a/net/batman-adv/gateway_client.c
+++ b/net/batman-adv/gateway_client.c
@@@ -695,7 -695,7 +695,7 @@@ bool gw_out_of_range(struct bat_priv *b
}
neigh_old = find_router(bat_priv, orig_dst_node, NULL);
- if (!!neigh_old)
+ if (!neigh_old)
goto out;
if (curr_tq_avg - neigh_old->tq_avg > GW_THRESHOLD)
diff --combined net/batman-adv/routing.c
index ef24a72,773e606..773e606
--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@@ -627,8 -627,7 +627,7 @@@ int recv_tt_query(struct sk_buff *skb,
/* Ensure we have all the claimed data */
if (unlikely(skb_headlen(skb) <
- sizeof(struct tt_query_packet) +
- tt_len))
+ sizeof(struct tt_query_packet) + tt_len))
goto out;
handle_tt_response(bat_priv, tt_query);
diff --combined net/batman-adv/translation-table.c
index cc87acf,58361ed..58361ed
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@@ -242,9 -242,10 +242,10 @@@ void tt_local_add(struct net_device *so
if (tt_global_entry) {
/* This node is probably going to update its tt table */
tt_global_entry->orig_node->tt_poss_change = true;
- /* The global entry has to be marked as PENDING and has to be
+ /* The global entry has to be marked as ROAMING and has to be
* kept for consistency purpose */
- tt_global_entry->common.flags |= TT_CLIENT_PENDING;
+ tt_global_entry->common.flags |= TT_CLIENT_ROAM;
+ tt_global_entry->roam_at = jiffies;
send_roam_adv(bat_priv, tt_global_entry->common.addr,
tt_global_entry->orig_node);
}
@@@ -661,6 -662,7 +662,7 @@@ void tt_global_del(struct bat_priv *bat
const char *message, bool roaming)
{
struct tt_global_entry *tt_global_entry = NULL;
+ struct tt_local_entry *tt_local_entry = NULL;
tt_global_entry = tt_global_hash_find(bat_priv, addr);
if (!tt_global_entry)
@@@ -668,15 -670,29 +670,29 @@@
if (tt_global_entry->orig_node == orig_node) {
if (roaming) {
- tt_global_entry->common.flags |= TT_CLIENT_ROAM;
- tt_global_entry->roam_at = jiffies;
- goto out;
+ /* if we are deleting a global entry due to a roam
+ * event, there are two possibilities:
+ * 1) the client roamed from node A to node B => we mark
+ * it with TT_CLIENT_ROAM, we start a timer and we
+ * wait for node B to claim it. In case of timeout
+ * the entry is purged.
+ * 2) the client roamed to us => we can directly delete
+ * the global entry, since it is useless now. */
+ tt_local_entry = tt_local_hash_find(bat_priv,
+ tt_global_entry->common.addr);
+ if (!tt_local_entry) {
+ tt_global_entry->common.flags |= TT_CLIENT_ROAM;
+ tt_global_entry->roam_at = jiffies;
+ goto out;
+ }
}
_tt_global_del(bat_priv, tt_global_entry, message);
}
out:
if (tt_global_entry)
tt_global_entry_free_ref(tt_global_entry);
+ if (tt_local_entry)
+ tt_local_entry_free_ref(tt_local_entry);
}
void tt_global_del_orig(struct bat_priv *bat_priv,
--
linux integration
The following commit has been merged in the master branch:
commit a091f9dd7ffecefafc41eca062db45ecc1a5a5a7
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Tue Jul 5 10:54:59 2011 +0200
vis: Replace version info instead of appending them
The version number of vis can get revision numbers added. This is useful to
give hints about the revision of a distribution package and the used patchset
or the commit which was used to build it. The prepended source number or branch
name doesn't add any additional information which would help to identify
problems and can therefore be omitted.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index 745b6e3..1804155 100755
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ OBJ = allocate.o hash.o list-batman.o vis.o udp_server.o
# vis flags and options
CFLAGS += -pedantic -Wall -W -std=gnu99 -MD
-CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE -DREVISION_VERSION=$(REVISION_VERSION)
+CPPFLAGS += -DDEBUG_MALLOC -DMEMORY_USAGE
LDLIBS += -lpthread
# disable verbose output
@@ -50,8 +50,12 @@ PREFIX = /usr/local
SBINDIR = $(PREFIX)/sbin
# try to generate revision
-REVISION = $(shell if [ -d .git ]; then echo $$(git describe --always --dirty 2> /dev/null || echo "[unknown]"); fi)
-REVISION_VERSION=\"\ $(REVISION)\"
+REVISION= $(shell if [ -d .git ]; then \
+ echo $$(git describe --always --dirty --match "v*" |sed 's/^v//' 2> /dev/null || echo "[unknown]"); \
+ fi)
+ifneq ($(REVISION),)
+CPPFLAGS += -DSOURCE_VERSION=\"$(REVISION)\"
+endif
# default target
all: $(BINARY_NAME)
diff --git a/vis.c b/vis.c
index a17e192..181d76a 100644
--- a/vis.c
+++ b/vis.c
@@ -901,7 +901,7 @@ int main( int argc, char **argv ) {
}
- debug_output("B.A.T.M.A.N. visualisation server %s%s successfully started ... \n", SOURCE_VERSION, (strlen("REVISION_VERSION") > 3 ? REVISION_VERSION : ""));
+ debug_output("B.A.T.M.A.N. visualisation server %s successfully started ... \n", SOURCE_VERSION);
pthread_create( &udp_server_thread, NULL, &udp_server, NULL );
diff --git a/vis.h b/vis.h
index 9f26ee6..74a3bd8 100644
--- a/vis.h
+++ b/vis.h
@@ -38,8 +38,9 @@
#include "allocate.h"
#include "list-batman.h"
-#define SOURCE_VERSION "0.4-alpha" //put exactly one distinct word inside the string like "0.3-pre-alpha" or "0.3-rc1" or "0.3"
-
+#ifndef SOURCE_VERSION
+#define SOURCE_VERSION "0.4"
+#endif
#define MAXCHAR 4096
@@ -49,10 +50,6 @@
#define ADDR_STR_LEN 16
-#ifndef REVISION_VERSION
-#define REVISION_VERSION "0"
-#endif
-
--
vis
The following commit has been merged in the master branch:
commit 1723d3c0b434af76113e5f2a2084cf98e0bc9262
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Mon Dec 5 19:56:41 2011 +0100
vis: Change s3d URL to s3d.sourceforge.net
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/README b/README
index 7e8a3a6..1ddceed 100644
--- a/README
+++ b/README
@@ -62,5 +62,5 @@ servers dot draw output (on port 2004). If you have impressive screenshots
don't hesitate to let us know. :-)
[1] http://downloads.open-mesh.net/batman/misc/wbm2009/08-vis_zoomed.png
-[2] http://s3d.berlios.de/
+[2] http://s3d.sourceforge.net/
diff --git a/vis.c b/vis.c
index 181d76a..039bfa0 100644
--- a/vis.c
+++ b/vis.c
@@ -720,7 +720,7 @@ void print_usage() {
printf( "\t-d debug level\n" );
printf( "\t-h help\n" );
printf( "\t-v Version\n\n" );
- printf( "Olsrs3d / Meshs3d is an application to visualize a mesh network.\nIt is a part of s3d, have a look at s3d.berlios.de\n\n" );
+ printf( "Olsrs3d / Meshs3d is an application to visualize a mesh network.\nIt is a part of s3d, have a look at s3d.sourceforge.net\n\n" );
}
--
vis
The following commit has been merged in the master branch:
commit cc952dd70ea1c2303fa8b9382e52c24b0991cf6e
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 15:45:10 2011 +0200
vis: Mark makefile targets without output as PHONY
Normally makefile targets should create an output with the same name as
the target. It is necessary to mark them as PHONY to prevent that the
virtual target like all, clean or install aren't executed when a file
with the same name exists.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index d9b011c..5cbff33 100755
--- a/Makefile
+++ b/Makefile
@@ -59,3 +59,5 @@ clean:
install:
mkdir -p $(SBINDIR)
install -m 0755 $(BINARY_NAME) $(SBINDIR)
+
+.PHONY: all clean install
--
vis
The following commit has been merged in the master branch:
commit 77217feb174263fd7229c5f70f56ff479eff7ce7
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 15:45:11 2011 +0200
vis: Only define CC when not already specified
It is possible that a build environment specifies the CC different than
gcc (for example gcc-4.6). The Makefile should only set it when the
compiler wasn't explicitely set.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index 5cbff33..2817292 100755
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,7 @@ ifndef V
endif
endif
-CC = gcc
+CC ?= gcc
CFLAGS += -pedantic -Wall -W -std=gnu99
EXTRA_CFLAGS = -DDEBUG_MALLOC -DMEMORY_USAGE -DREVISION_VERSION=$(REVISION_VERSION)
LDFLAGS += -lpthread
--
vis
The following commit has been merged in the master branch:
commit ba4ca3466fc1ddfc34221c51a2b157e1b9fcdac3
Author: Sven Eckelmann <sven(a)narfation.org>
Date: Sat May 21 15:45:12 2011 +0200
vis: Build binary before installing it
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
diff --git a/Makefile b/Makefile
index 2817292..75d59cc 100755
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ $(BINARY_NAME): $(OBJ) Makefile
clean:
rm -f $(BINARY_NAME) $(OBJ) $(DEP)
-install:
+install: $(BINARY_NAME)
mkdir -p $(SBINDIR)
install -m 0755 $(BINARY_NAME) $(SBINDIR)
--
vis