Revision 14d30d82 include/Host.h

View differences:

include/Host.h
114 114
    int update_info(string &parse_str);
115 115

  
116 116
    /**
117
     * Inserts the last monitoring, and deletes old monitoring entries.
118
     *
119
     * @param db pointer to the db
120
     * @return 0 on success
121
     */
122
    int update_monitoring(SqlDB * db);
123

  
124
    /**
125
     * Deletes all monitoring entries.
126
     *
127
     * @param db pointer to the db
128
     * @return 0 on success
129
     */
130
    int clean_monitoring(SqlDB * db);
131

  
132
    /**
117 133
     * Retrives host state
118 134
     *    @return HostState code number
119 135
     */
......
355 371

  
356 372
    static const char * table;
357 373

  
374
    static const char * monit_db_names;
375

  
376
    static const char * monit_db_bootstrap;
377

  
378
    static const char * monit_table;
379

  
358 380
    /**
359 381
     *  Execute an INSERT or REPLACE Sql query.
360 382
     *    @param db The SQL DB
......
370 392
     */
371 393
    static int bootstrap(SqlDB * db)
372 394
    {
395
        int rc;
396

  
373 397
        ostringstream oss_host(Host::db_bootstrap);
398
        ostringstream oss_monit(Host::monit_db_bootstrap);
399

  
400
        rc =  db->exec(oss_host);
401
        rc += db->exec(oss_monit);
374 402

  
375
        return db->exec(oss_host);
403
        return rc;
376 404
    };
377 405

  
378 406
    /**

Also available in: Unified diff