MCPcopy Create free account
hub / github.com/apache/nuttx / rpmsg_socket_close

Function rpmsg_socket_close

net/rpmsg/rpmsg_sockif.c:1351–1387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1349}
1350
1351static int rpmsg_socket_close(FAR struct socket *psock)
1352{
1353 FAR struct rpmsg_socket_conn_s *conn = psock->s_conn;
1354
1355 if (--conn->crefs)
1356 {
1357 return 0;
1358 }
1359
1360 if (conn->backlog > 0)
1361 {
1362 rpmsg_unregister_callback(conn,
1363 NULL,
1364 NULL,
1365 rpmsg_socket_ns_match,
1366 rpmsg_socket_ns_bind);
1367 }
1368 else
1369 {
1370 rpmsg_unregister_callback(conn,
1371 rpmsg_socket_device_created,
1372 NULL,
1373 NULL,
1374 NULL);
1375 }
1376
1377 if (conn->ept.rdev)
1378 {
1379 rpmsg_socket_destroy_ept(conn);
1380 }
1381 else
1382 {
1383 rpmsg_socket_free(conn);
1384 }
1385
1386 return 0;
1387}
1388
1389static void rpmsg_socket_path(FAR struct rpmsg_socket_conn_s *conn,
1390 FAR char *buf, size_t len)

Callers

nothing calls this directly

Calls 3

rpmsg_socket_destroy_eptFunction · 0.85
rpmsg_socket_freeFunction · 0.85

Tested by

no test coverage detected