server: fix incorrect locking

This commit is contained in:
Thomas Schoebel-Theuer 2013-01-14 21:19:45 +01:00
parent 669a2d6f07
commit 9c9a8d22d7
1 changed files with 2 additions and 3 deletions

View File

@ -338,10 +338,9 @@ int handler_thread(void *data)
}
down(&brick->socket_sem);
status = mars_send_struct(sock, &cmd, mars_cmd_meta);
if (status < 0) {
break;
if (status >= 0) {
status = mars_send_struct(sock, &info, mars_info_meta);
}
status = mars_send_struct(sock, &info, mars_info_meta);
up(&brick->socket_sem);
break;
}