src/Reporter.c
/*
 * ReportSettings will generate a summary report for
 * settings being used with Listeners or Clients
 */
ReportSettings will generate a summary report for
settings being used with Listeners or Clients
ReportSettings will generate a summary report for settings being used with Listeners or Clients
void ReportSettings( thread_Settings *agent ) {
    if ( isSettingsReport( agent ) ) {
        ReportHeader *reporthdr = malloc( sizeof(ReportHeader) );
        if ( reporthdr != NULL ) {
            ReporterData *data = &reporthdr->report;
            data->info.transferID = agent->mSock;
            data->info.groupID = -1;
            reporthdr->agentindex = -1;
            reporthdr->reporterindex = -1;
            data->mHost = agent->mHost;
            data->mLocalhost = agent->mLocalhost;
            data->mode = agent->mReportMode;
            data->type = SETTINGS_REPORT;
            data->mBufLen = agent->mBufLen;
            data->mMSS = agent->mMSS;
            data->mTCPWin = agent->mTCPWin;
            data->flags = agent->flags;
            data->mThreadMode = agent->mThreadMode;
            data->mPort = agent->mPort;
            data->info.mFormat = agent->mFormat;
            data->info.mTTL = agent->mTTL;
            data->connection.peer = agent->peer;
            data->connection.size_peer = agent->size_peer;
            data->connection.local = agent->local;
            data->connection.size_local = agent->size_local;
            data->mUDPRate = agent->mUDPRate;
            data->mUDPRateUnits = agent->mUDPRateUnits;
    #ifdef HAVE_THREAD
            Condition_Lock( ReportCond );
            reporthdr->next = ReportRoot;
            ReportRoot = reporthdr;
            Condition_Signal( &ReportCond );
            Condition_Unlock( ReportCond );
    #else
            reporthdr->next = NULL;
            process_report ( reporthdr );
    #endif
        } else {
            FAIL(1, "Out of Memory!!\n", agent);
        }
    }
}
void ReportSettings ( thread_Settings * agent ) { if ( isSettingsReport ( agent ) ) { ReportHeader * reporthdr = malloc ( sizeof ( ReportHeader ) ) ; if ( reporthdr != NULL ) { ReporterData * data = & reporthdr -> report ; data -> info . transferID = agent -> mSock ; data -> info . groupID = -1 ; reporthdr -> agentindex = -1 ; reporthdr -> reporterindex = -1 ; data -> mHost = agent -> mHost ; data -> mLocalhost = agent -> mLocalhost ; data -> mode = agent -> mReportMode ; data -> type = SETTINGS_REPORT ; data -> mBufLen = agent -> mBufLen ; data -> mMSS = agent -> mMSS ; data -> mTCPWin = agent -> mTCPWin ; data -> flags = agent -> flags ; data -> mThreadMode = agent -> mThreadMode ; data -> mPort = agent -> mPort ; data -> info . mFormat = agent -> mFormat ; data -> info . mTTL = agent -> mTTL ; data -> connection . peer = agent -> peer ; data -> connection . size_peer = agent -> size_peer ; data -> connection . local = agent -> local ; data -> connection . size_local = agent -> size_local ; data -> mUDPRate = agent -> mUDPRate ; data -> mUDPRateUnits = agent -> mUDPRateUnits ; #ifdef HAVE_THREAD Condition_Lock ( ReportCond ) ; reporthdr -> next = ReportRoot ; ReportRoot = reporthdr ; Condition_Signal ( & ReportCond ) ; Condition_Unlock ( ReportCond ) ; #else reporthdr -> next = NULL ; process_report ( reporthdr ) ; #endif } else { FAIL ( 1 , " \n " , agent ) ; } } }
ReportSettings will generate a summary report for
 settings being used with Listeners or Clients
ReportSettings will generate a summary report for settings being used with Listeners or Clients
/*
         * Create in one big chunk
         */ /*
             * Update the ReportRoot to include this report.
             */ /*
             * Process the report in this thread
             */