Changeset 16d748ee in mainline for uspace/lib/c/generic/async/server.c


Ignore:
Timestamp:
2020-01-05T03:04:38Z (4 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
66b1075
Parents:
2f04bdd
git-author:
Matthieu Riolo <matthieu.riolo@…> (2019-11-30 20:47:26)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2020-01-05 03:04:38)
Message:

Removing implicit handler from async/server and taskman.
Correcting taskman methods and it's fallback handler
Simplifying connecting to taskman

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async/server.c

    r2f04bdd r16d748ee  
    216216}
    217217
    218 static async_port_handler_t implicit_connection = NULL;
    219 
    220 /** Setter for implicit_connection function pointer.
    221  *
    222  * @param conn Function that will implement a new connection fibril for
    223  *             unrouted calls.
    224  *
    225  */
    226 void async_set_implicit_connection(async_port_handler_t conn)
    227 {
    228         assert(implicit_connection == NULL);
    229         implicit_connection = conn;
    230 }
    231 
    232218static fibril_rmutex_t client_mutex;
    233219static hash_table_t client_hash_table;
     
    407393 *                    either a callback connection that was opened by
    408394 *                    accepting the IPC_M_CONNECT_TO_ME call.
    409  *                    Alternatively, it is zero when we are opening
    410  *                    implicit connection.
    411395 * @param handler     Connection handler.
    412396 * @param data        Client argument to pass to the connection handler.
     
    979963        /* Route the call according to its request label */
    980964        errno_t rc = route_call(call);
    981         if (rc == EOK) {
     965        if (rc == EOK)
    982966                return;
    983         } else if (implicit_connection != NULL) {
    984                 connection_t *conn = calloc(1, sizeof(connection_t));
    985                 if (!conn) {
    986                         ipc_answer_0(call->cap_handle, ENOMEM);
    987                         return;
    988                 }
    989 
    990                 async_new_connection(conn, call->task_id, call, implicit_connection, NULL);
    991                 return;
    992         }
    993967
    994968        // TODO: Log the error.
    995 
    996969        if (call->cap_handle != CAP_NIL)
    997970                /* Unknown call from unknown phone - hang it up */
Note: See TracChangeset for help on using the changeset viewer.