Line data Source code
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 0 : void KStateIoContext::Handler() { 10 : 11 0 : SandeshContext *ctx = GetSandeshContext(); 12 0 : KState *kctx = static_cast<KState *>(ctx); 13 : 14 0 : kctx->Handler(); 15 : 16 0 : if (kctx->more_context().empty()) 17 0 : delete kctx; 18 0 : } 19 : 20 0 : void KStateIoContext::ErrorHandler(int err) { 21 0 : KSYNC_ERROR(VRouterError, "VRouter query operation failed. Error <", err, 22 : ":", strerror(err), ">. Object <", "N/A", ">. State <", "N/A", 23 : ">. Message number :", GetSeqno()); 24 0 : LOG(ERROR, "Error reading kstate. Error <" << err << ": " 25 : << strerror(err) << ": Sequence No : " << GetSeqno()); 26 : 27 0 : }