OpenSDN source code
 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 
10 
12  KState *kctx = static_cast<KState *>(ctx);
13 
14  kctx->Handler();
15 
16  if (kctx->more_context().empty())
17  delete kctx;
18 }
19 
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 }
uint32_t GetSeqno() const
Definition: ksync_sock.h:138
Definition: kstate.h:24
#define KSYNC_ERROR(obj,...)
Definition: ksync_entry.h:16
const boost::any & more_context() const
Definition: kstate.h:43
AgentSandeshContext * GetSandeshContext()
Definition: ksync_sock.h:134
void ErrorHandler(int err)
virtual void Handler()=0
#define LOG(_Level, _Msg)
Definition: logging.h:33