Changeset 89e5c0c7 in mainline
- Timestamp:
- 2024-10-01T09:43:36Z (4 months ago)
- Branches:
- master
- Children:
- 357d9dd
- Parents:
- c23a1fe
- git-author:
- Jiri Svoboda <jiri@…> (2024-09-30 17:43:19)
- git-committer:
- Jiri Svoboda <jiri@…> (2024-10-01 09:43:36)
- Location:
- uspace/srv/hid/remcons
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/hid/remcons/remcons.c
rc23a1fe r89e5c0c7 532 532 remcons_t *remcons = (remcons_t *)arg; 533 533 534 (void)telnet_user_send_ data(remcons->user, str, str_size(str));534 (void)telnet_user_send_raw(remcons->user, str, str_size(str)); 535 535 } 536 536 -
uspace/srv/hid/remcons/user.c
rc23a1fe r89e5c0c7 215 215 * might be negative. 216 216 */ 217 static errno_t telnet_user_recv_next_byte_ no_lock(telnet_user_t *user, char *byte)217 static errno_t telnet_user_recv_next_byte_locked(telnet_user_t *user, char *byte) 218 218 { 219 219 errno_t rc; … … 322 322 fibril_mutex_unlock(&user->guard); 323 323 324 errno_t rc = telnet_user_recv_next_byte_ no_lock(user, &next_byte);324 errno_t rc = telnet_user_recv_next_byte_locked(user, &next_byte); 325 325 if (rc != EOK) 326 326 return rc; … … 372 372 } 373 373 374 static errno_t telnet_user_send_raw (telnet_user_t *user,374 static errno_t telnet_user_send_raw_locked(telnet_user_t *user, 375 375 const void *data, size_t size) 376 376 { … … 408 408 * @param size Size of @p data buffer in bytes. 409 409 */ 410 static errno_t telnet_user_send_data_ no_lock(telnet_user_t *user,410 static errno_t telnet_user_send_data_locked(telnet_user_t *user, 411 411 const char *data, size_t size) 412 412 { … … 433 433 } 434 434 435 errno_t rc = telnet_user_send_raw(user, converted, converted_size); 435 errno_t rc = telnet_user_send_raw_locked(user, converted, 436 converted_size); 436 437 free(converted); 437 438 … … 450 451 fibril_mutex_lock(&user->guard); 451 452 452 errno_t rc = telnet_user_send_data_no_lock(user, data, size); 453 errno_t rc = telnet_user_send_data_locked(user, data, size); 454 455 fibril_mutex_unlock(&user->guard); 456 457 return rc; 458 } 459 460 /** Send raw non-printable data to the socket. 461 * 462 * @param user Telnet user. 463 * @param data Data buffer (not zero terminated). 464 * @param size Size of @p data buffer in bytes. 465 */ 466 errno_t telnet_user_send_raw(telnet_user_t *user, const char *data, 467 size_t size) 468 { 469 fibril_mutex_lock(&user->guard); 470 471 errno_t rc = telnet_user_send_raw_locked(user, data, size); 453 472 454 473 fibril_mutex_unlock(&user->guard); … … 487 506 char data = '\b'; 488 507 /* Ignore errors. */ 489 telnet_user_send_data_ no_lock(user, &data, 1);508 telnet_user_send_data_locked(user, &data, 1); 490 509 } 491 510 user->cursor_x = new_x; -
uspace/srv/hid/remcons/user.h
rc23a1fe r89e5c0c7 98 98 extern errno_t telnet_user_get_next_keyboard_event(telnet_user_t *, kbd_event_t *); 99 99 extern errno_t telnet_user_send_data(telnet_user_t *, const char *, size_t); 100 extern errno_t telnet_user_send_raw(telnet_user_t *, const char *, size_t); 100 101 extern errno_t telnet_user_flush(telnet_user_t *); 101 102 extern errno_t telnet_user_recv(telnet_user_t *, void *, size_t, size_t *);
Note:
See TracChangeset
for help on using the changeset viewer.