- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Name: dragon
Subject: Re: about search.cgi

it seems that it call this function in db.c(__C_LINK int __DPSCALL 
DpsCatAction(DPS_AGENT *A, DPS_CATEGORY *C, int cmd){
        DPS_DB  *db;
        int     res=DPS_ERROR;
        size_t i, dbfrom = 0, dbto;

        TRACE_IN(A, "DpsCatAction");

        if (A->flags & DPS_FLAG_UNOCON) DPS_GETLOCK(A, DPS_LOCK_CONF);
        dbto =  (A->flags & DPS_FLAG_UNOCON) ? A->Conf->dbl.nitems : 
A->dbl.nitems;
        if (A->flags & DPS_FLAG_UNOCON) DPS_RELEASELOCK(A, DPS_LOCK_CONF);

        for (i = dbfrom; i < dbto; i++) {
          db = (A->flags & DPS_FLAG_UNOCON) ? &A->Conf->dbl.db[i] : 
&A->dbl.db[i];
          if (A->flags & DPS_FLAG_UNOCON) DPS_GETLOCK(A, DPS_LOCK_DB);
          switch(db->DBDriver) {
          case DPS_DB_SEARCHD:
                res = DpsSearchdCatAction(A, C, cmd, db);
                break;
#ifdef HAVE_SQL
          default:
            if (db->DBType != DPS_DB_CACHE)
              res = DpsCatActionSQL(A, C, cmd, db);
#endif
          }
          if(res != DPS_OK){
                DpsLog(A, DPS_LOG_ERROR, db->errstr);
          }
          if (A->flags & DPS_FLAG_UNOCON) DPS_RELEASELOCK(A, DPS_LOCK_DB);
          if (res != DPS_OK) break;
        }
        TRACE_OUT(A);
        return res;
}
)
- - - - - - - - - - - - - - - - - - - - - - - - - - - -

Read the full topic here:
http://www.dataparksearch.org/cgi-bin/simpleforum.cgi?fid=02;topic_id=1164402107

Reply via email to