| 1349 | } |
| 1350 | |
| 1351 | static 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 | |
| 1389 | static void rpmsg_socket_path(FAR struct rpmsg_socket_conn_s *conn, |
| 1390 | FAR char *buf, size_t len) |
nothing calls this directly
no test coverage detected