Line data Source code
1 : /* 2 : * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. 3 : * Copyright Contributors to the OpenSDN project 4 : */ 5 : 6 : #include <kstate/kstate.h> 7 : #include "kstate_io_context.h" 8 : #include "ksync/ksync_types.h" 9 : 10 0 : void KStateIoContext::Handler() { 11 : 12 0 : SandeshContext *ctx = GetSandeshContext(); 13 0 : KState *kctx = static_cast<KState *>(ctx); 14 : 15 0 : kctx->Handler(); 16 : 17 0 : if (kctx->more_context().empty()) 18 0 : delete kctx; 19 0 : } 20 : 21 0 : void KStateIoContext::ErrorHandler(int err) { 22 0 : KSYNC_ERROR(VRouterError, "VRouter query operation failed. Error <", err, 23 : ":", strerror(err), ">. Object <", "N/A", ">. State <", "N/A", 24 : ">. Message number :", GetSeqno()); 25 0 : LOG(ERROR, "Error reading kstate. Error <" << err << ": " 26 : << strerror(err) << ": Sequence No : " << GetSeqno()); 27 : 28 0 : }