Changeset 153


Ignore:
Timestamp:
Jan 23, 2016, 6:04:50 PM (7 years ago)
Author:
coas-nagasima
Message:

作業用のバッファの扱いが間違っているのを修正

Location:
uKadecot/trunk
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • uKadecot/trunk/ecnl_ssp/echonet_fbs.c

    r108 r153  
    352352void *_ecn_fbs_mbx_get(ECN_FBS_SIZE_T fa_req_size)
    353353{
    354         T_ECN_FST_BLK *result = NULL;
    355 
    356         get_message(&result, fa_req_size);
     354        void *result;
     355        ER ret;
     356
     357        if ((fa_req_size <= 0) || (fa_req_size > ECHONET_MEMPOOL_BLOCK_SIZE))
     358                return NULL;
     359
     360        ret = get_mpf(ecn_mempoolid, &result);
     361        if (ret != E_OK)
     362                return NULL;
     363
     364        memset(result, 0, ECHONET_MEMPOOL_BLOCK_SIZE);
    357365
    358366        return result;
     
    362370ER _ecn_fbs_mbx_rel(void *p)
    363371{
    364         return release_message((T_ECN_FST_BLK *)p);
     372        return rel_mpf(ecn_mempoolid, p);
    365373}
    366374
Note: See TracChangeset for help on using the changeset viewer.