OpenSDN source code
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
kstate_io_context.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3
*/
4
5
#include <
kstate/kstate.h
>
6
#include "
kstate_io_context.h
"
7
#include "ksync/ksync_types.h"
8
9
void
KStateIoContext::Handler
() {
10
11
SandeshContext
*ctx =
GetSandeshContext
();
12
KState
*kctx =
static_cast<
KState
*
>
(ctx);
13
14
kctx->
Handler
();
15
16
if
(kctx->
more_context
().empty())
17
delete
kctx;
18
}
19
20
void
KStateIoContext::ErrorHandler
(
int
err) {
21
KSYNC_ERROR
(VRouterError,
"VRouter query operation failed. Error <"
, err,
22
":"
, strerror(err),
">. Object <"
,
"N/A"
,
">. State <"
,
"N/A"
,
23
">. Message number :"
,
GetSeqno
());
24
LOG
(ERROR,
"Error reading kstate. Error <"
<< err <<
": "
25
<< strerror(err) <<
": Sequence No : "
<<
GetSeqno
());
26
27
}
IoContext::GetSeqno
uint32_t GetSeqno() const
Definition:
ksync_sock.h:138
SandeshContext
Definition:
p/sandesh.h:106
KState
Definition:
kstate.h:24
KSYNC_ERROR
#define KSYNC_ERROR(obj,...)
Definition:
ksync_entry.h:16
KState::more_context
const boost::any & more_context() const
Definition:
kstate.h:43
IoContext::GetSandeshContext
AgentSandeshContext * GetSandeshContext()
Definition:
ksync_sock.h:134
KStateIoContext::ErrorHandler
void ErrorHandler(int err)
Definition:
kstate_io_context.cc:20
KStateIoContext::Handler
void Handler()
Definition:
kstate_io_context.cc:9
KState::Handler
virtual void Handler()=0
kstate.h
LOG
#define LOG(_Level, _Msg)
Definition:
logging.h:33
kstate_io_context.h
contrail
controller
src
vnsw
agent
kstate
kstate_io_context.cc
Generated by
1.8.5