Changeset f6bc83a in mainline for uspace/srv/logger/main.c


Ignore:
Timestamp:
2012-07-04T13:21:52Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef5be68
Parents:
e1eda1e9
Message:

Send log messages only when they are read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/logger/main.c

    re1eda1e9 rf6bc83a  
    7474static int handle_receive_message(logging_namespace_t *namespace, int level)
    7575{
     76        bool skip_message = (level > DEFAULT_LOGGING_LEVEL) || !namespace_has_reader(namespace);
     77        if (skip_message) {
     78                /* Abort the actual message buffer transfer. */
     79                ipc_callid_t callid;
     80                size_t size;
     81                int rc = ENAK;
     82                if (!async_data_write_receive(&callid, &size))
     83                        rc = EINVAL;
     84
     85                async_answer_0(callid, rc);
     86                return rc;
     87        }
     88
    7689        void *message;
    7790        int rc = async_data_write_accept(&message, true, 0, 0, 0, NULL);
Note: See TracChangeset for help on using the changeset viewer.