Skip to content

Commit

Permalink
server: Pass correct packet size environment in test server
Browse files Browse the repository at this point in the history
Sybase and Microsoft use different packet sizes.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
  • Loading branch information
freddy77 committed Dec 8, 2024
1 parent be7c38d commit e2cf0d3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/unittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ main(int argc, char **argv)
tds_env_change(tds, TDS_ENV_LANG, NULL, "us_english");
tds_send_msg(tds, 5703, 1, 10, "Changed language setting to 'us_english'.", "JDBC", "ZZZZZ", 1);
}
tds_env_change(tds, TDS_ENV_PACKSIZE, NULL, "512");
if (IS_TDS50(tds->conn))
tds_env_change(tds, TDS_ENV_PACKSIZE, NULL, "512");
/* TODO set mssql if tds7+ */
tds_send_login_ack(tds, "sql server");
if (!IS_TDS50(tds->conn))
tds_env_change(tds, TDS_ENV_PACKSIZE, "4096", "4096");
if (IS_TDS50(tds->conn))
tds_send_capabilities_token(tds);
tds_send_done_token(tds, TDS_DONE_FINAL, 0);
Expand Down

0 comments on commit e2cf0d3

Please sign in to comment.