Skip to content

Commit

Permalink
Merge branch 'main' into audio
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee authored Jun 29, 2024
2 parents cf44eeb + 7945648 commit dc60a1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/C/src/lib/WebSocketServerString.lf
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ reactor WebSocketServerString(hostport: int = 8080, initial_file: string = {= NU
if (in_dynamic->is_present) {
message_copy = (char*)malloc(strlen(in_dynamic->value));
strcpy(message_copy, in_dynamic->value);
to_send->length = strlen(in_dynamic->value);
} else {
message_copy = (char*)malloc(strlen(in_static->value));
strcpy(message_copy, in_static->value);
to_send->length = strlen(in_static->value);
}
to_send->message = message_copy;
to_send->length = strlen(in_dynamic->value);
to_send->wsi = self->ws.wsi;

lf_set(server.send, to_send);
} else {
// Web socket is not connected.
Expand Down

0 comments on commit dc60a1f

Please sign in to comment.