mirror of
https://github.com/curl/curl.git
synced 2026-05-30 08:47:28 +03:00
tests/server: check for stream != NULL in mqttd
To avoid an assert in `fgets()` on MSVC when the test case is missing. Bug: https://github.com/curl/curl/pull/17294#issuecomment-2867501300 Closes #17324
This commit is contained in:
parent
4f055feee2
commit
144706342f
1 changed files with 6 additions and 0 deletions
|
|
@ -583,6 +583,12 @@ static curl_socket_t mqttit(curl_socket_t fd)
|
|||
|
||||
logmsg("SUBSCRIBE to '%s' [%d]", topic, packet_id);
|
||||
stream = test2fopen(testno, logdir);
|
||||
if(!stream) {
|
||||
error = errno;
|
||||
logmsg("fopen() failed with error (%d) %s", error, strerror(error));
|
||||
logmsg("Couldn't open test file %ld", testno);
|
||||
goto end;
|
||||
}
|
||||
error = getpart(&data, &datalen, "reply", "data", stream);
|
||||
if(!error) {
|
||||
if(!m_config.publish_before_suback) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue