[grilo/mocking] net: Don't capture while mocking is enabled
- From: Mathias Hasselmann <hasselmm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo/mocking] net: Don't capture while mocking is enabled
- Date: Mon, 22 Oct 2012 16:27:39 +0000 (UTC)
commit ab63b96dfaedb0bdd70caf24d141e08bb4ffe107
Author: Mathias Hasselmann <mathias openismus com>
Date: Mon Oct 22 18:27:03 2012 +0200
net: Don't capture while mocking is enabled
libs/net/grl-net-private.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libs/net/grl-net-private.c b/libs/net/grl-net-private.c
index c157f9b..3efda54 100644
--- a/libs/net/grl-net-private.c
+++ b/libs/net/grl-net-private.c
@@ -101,6 +101,11 @@ init_dump_directory ()
{
capture_dir = g_getenv (GRL_NET_CAPTURE_DIR_VAR);
+ if (capture_dir && is_mocked ()) {
+ GRL_WARNING ("Cannot capture while mocking is enabled.");
+ capture_dir = NULL;
+ }
+
if (capture_dir && g_mkdir_with_parents (capture_dir, 0700)) {
GRL_WARNING ("Could not create capture directory \"%s\": %s",
capture_dir, g_strerror (errno));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]