Changeset 16d748ee in mainline for uspace/lib/c/generic/async/server.c
- Timestamp:
- 2020-01-05T03:04:38Z (5 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/server.c
r2f04bdd r16d748ee 216 216 } 217 217 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 for223 * 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 232 218 static fibril_rmutex_t client_mutex; 233 219 static hash_table_t client_hash_table; … … 407 393 * either a callback connection that was opened by 408 394 * accepting the IPC_M_CONNECT_TO_ME call. 409 * Alternatively, it is zero when we are opening410 * implicit connection.411 395 * @param handler Connection handler. 412 396 * @param data Client argument to pass to the connection handler. … … 979 963 /* Route the call according to its request label */ 980 964 errno_t rc = route_call(call); 981 if (rc == EOK) {965 if (rc == EOK) 982 966 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 }993 967 994 968 // TODO: Log the error. 995 996 969 if (call->cap_handle != CAP_NIL) 997 970 /* Unknown call from unknown phone - hang it up */
Note:
See TracChangeset
for help on using the changeset viewer.