X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fjsonrpc.c;h=5d394c68050e2afa5d8d1f31acc786b1ac2f4f38;hb=ba18611;hp=d06cdcd1ee6a6efe9d8a9a28249fe306be5aa7ef;hpb=d1b801a597ddcaaa2bf03611ec88037a45f40355;p=openvswitch diff --git a/lib/jsonrpc.c b/lib/jsonrpc.c index d06cdcd1..5d394c68 100644 --- a/lib/jsonrpc.c +++ b/lib/jsonrpc.c @@ -32,9 +32,9 @@ #include "reconnect.h" #include "stream.h" #include "timeval.h" - -#define THIS_MODULE VLM_jsonrpc #include "vlog.h" + +VLOG_DEFINE_THIS_MODULE(jsonrpc) struct jsonrpc { struct stream *stream; @@ -700,7 +700,10 @@ jsonrpc_session_open(const char *name) } /* Creates and returns a jsonrpc_session that is initially connected to - * 'jsonrpc'. If the connection is dropped, it will not be reconnected. */ + * 'jsonrpc'. If the connection is dropped, it will not be reconnected. + * + * On the assumption that such connections are likely to be short-lived + * (e.g. from ovs-vsctl), informational logging for them is suppressed. */ struct jsonrpc_session * jsonrpc_session_open_unreliably(struct jsonrpc *jsonrpc) { @@ -708,6 +711,7 @@ jsonrpc_session_open_unreliably(struct jsonrpc *jsonrpc) s = xmalloc(sizeof *s); s->reconnect = reconnect_create(time_msec()); + reconnect_set_quiet(s->reconnect, true); reconnect_set_name(s->reconnect, jsonrpc_get_name(jsonrpc)); reconnect_set_max_tries(s->reconnect, 0); reconnect_connected(s->reconnect, time_msec());