Skip to content

Commit

Permalink
Merge branch 'master' of gitlab.ucode.world:connect-khpi/connect-ucha…
Browse files Browse the repository at this point in the history
…t/pbalazhy-2
  • Loading branch information
YaroslavChuiko committed Feb 5, 2022
2 parents 1279693 + 8d8797f commit 3bf356a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/src/gui/build_change_avatar_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ void change_avatar_btn_click(GtkWidget *widget, gpointer data) {
char *new_avatar = (char*)gtk_entry_get_text(GTK_ENTRY(path_field));

handle_update_user_image(new_avatar);
usleep(100000);
handle_get_user_image(utils->current_user->user_id, &utils->current_user->avatar_path);

gtk_widget_destroy(toplevel);
Expand Down
2 changes: 1 addition & 1 deletion client/src/request_handlers/get_user_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void handle_get_user_image(int user_id, char** avatar_path) {

// Reciving len of encoded image
int len_encoded = 0;
usleep(2000000);
usleep(500000);
if(recv(utils->server_fd, &len_encoded, sizeof(int), 0) == 0) {
printf("Error while receiving length\n");
mx_strdel(&file_path);
Expand Down
2 changes: 1 addition & 1 deletion server/src/api/handle_update_user_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void handle_update_user_image(const cJSON* data, t_server_utils* utils){

// Get len of encoded image
int len_encoded = 0;
usleep(2000000);
usleep(500000);
recv(utils->user->client_fd, &len_encoded, sizeof(int), 0);
//printf("%d\n", len_encoded);

Expand Down

0 comments on commit 3bf356a

Please sign in to comment.