git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sliver-ovs: ignore pid files when starting servers
[sliver-openvswitch.git]
/
ovsdb
/
trigger.c
diff --git
a/ovsdb/trigger.c
b/ovsdb/trigger.c
index
6ae1f51
..
74a1b0f
100644
(file)
--- a/
ovsdb/trigger.c
+++ b/
ovsdb/trigger.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2009, 2010, 2011 Nicira, Inc.
+/* Copyright (c) 2009, 2010, 2011
, 2012
Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-17,7
+17,6
@@
#include "trigger.h"
#include "trigger.h"
-#include <assert.h>
#include <limits.h>
#include "json.h"
#include <limits.h>
#include "json.h"
@@
-30,12
+29,13
@@
static bool ovsdb_trigger_try(struct ovsdb_trigger *, long long int now);
static void ovsdb_trigger_complete(struct ovsdb_trigger *);
void
static void ovsdb_trigger_complete(struct ovsdb_trigger *);
void
-ovsdb_trigger_init(struct ovsdb_session *session,
+ovsdb_trigger_init(struct ovsdb_session *session,
struct ovsdb *db,
struct ovsdb_trigger *trigger,
struct json *request, long long int now)
{
trigger->session = session;
struct ovsdb_trigger *trigger,
struct json *request, long long int now)
{
trigger->session = session;
- list_push_back(&trigger->session->db->triggers, &trigger->node);
+ trigger->db = db;
+ list_push_back(&trigger->db->triggers, &trigger->node);
trigger->request = request;
trigger->result = NULL;
trigger->created = now;
trigger->request = request;
trigger->result = NULL;
trigger->created = now;
@@
-110,7
+110,7
@@
ovsdb_trigger_wait(struct ovsdb *db, long long int now)
static bool
ovsdb_trigger_try(struct ovsdb_trigger *t, long long int now)
{
static bool
ovsdb_trigger_try(struct ovsdb_trigger *t, long long int now)
{
- t->result = ovsdb_execute(t->
session->
db, t->session,
+ t->result = ovsdb_execute(t->db, t->session,
t->request, now - t->created, &t->timeout_msec);
if (t->result) {
ovsdb_trigger_complete(t);
t->request, now - t->created, &t->timeout_msec);
if (t->result) {
ovsdb_trigger_complete(t);
@@
-123,7
+123,7
@@
ovsdb_trigger_try(struct ovsdb_trigger *t, long long int now)
static void
ovsdb_trigger_complete(struct ovsdb_trigger *t)
{
static void
ovsdb_trigger_complete(struct ovsdb_trigger *t)
{
- assert(t->result != NULL);
+
ovs_
assert(t->result != NULL);
list_remove(&t->node);
list_push_back(&t->session->completions, &t->node);
}
list_remove(&t->node);
list_push_back(&t->session->completions, &t->node);
}