Skip to content
Snippets Groups Projects
Commit 4a0206fd authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

service Master resolve file is no longer a service incorporate to the DB. It...

service Master resolve file is no longer a service incorporate to the DB. It was reorganize to provide mandatory field to be a real Master. This file will now be used to known the global state of the services.
parent 7b6bacf6
No related branches found
No related tags found
No related merge requests found
/*
* service_resolve_master_write_cdb.c
*
* Copyright (c) 2018-2021 Eric Vidal <eric@obarun.org>
*
* All rights reserved.
*
* This file is part of Obarun. It is subject to the license terms in
* the LICENSE file found in the top-level directory of this
* distribution.
* This file may not be copied, modified, propagated, or distributed
* except according to the terms contained in the LICENSE file.
*/
#include <oblibs/log.h>
#include <skalibs/cdbmake.h>
#include <66/service.h>
#include <66/resolve.h>
int service_resolve_master_write_cdb(cdbmaker *c, resolve_service_master_t *mres)
{
log_flow() ;
char *str = mres->sa.s ;
/* name */
if (!resolve_add_cdb(c,"name",str + mres->name) ||
/* classic */
!resolve_add_cdb(c,"classic",str + mres->classic) ||
/* bundle */
!resolve_add_cdb(c,"bundle",str + mres->bundle) ||
/* longrun */
!resolve_add_cdb(c,"longrun",str + mres->longrun) ||
/* oneshot */
!resolve_add_cdb(c,"oneshot",str + mres->oneshot) ||
/* module */
!resolve_add_cdb(c,"module",str + mres->module) ||
/* nclassic */
!resolve_add_cdb_uint(c,"nclassic",mres->nclassic) ||
/* nbundle */
!resolve_add_cdb_uint(c,"nbundle",mres->nbundle) ||
/* nlongrun */
!resolve_add_cdb_uint(c,"nlongrun",mres->nlongrun) ||
/* noneshot */
!resolve_add_cdb_uint(c,"noneshot",mres->noneshot) ||
/* nmodule */
!resolve_add_cdb_uint(c,"nmodule",mres->nmodule)) return 0 ;
return 1 ;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment