mirror of
https://github.com/curl/curl.git
synced 2026-04-15 01:01:41 +03:00
servers: convert two macros to scoped static const strings
Closes #18067
This commit is contained in:
parent
85e18a5b9a
commit
3bdef96aba
2 changed files with 10 additions and 10 deletions
|
|
@ -716,19 +716,19 @@ static int rtspd_send_doc(curl_socket_t sock, struct rtspd_httprequest *req)
|
|||
default:
|
||||
case RCMD_NORMALREQ:
|
||||
break; /* continue with business as usual */
|
||||
case RCMD_STREAM:
|
||||
#define STREAMTHIS "a string to stream 01234567890\n"
|
||||
count = strlen(STREAMTHIS);
|
||||
case RCMD_STREAM: {
|
||||
static const char streamthis[] = "a string to stream 01234567890\n";
|
||||
for(;;) {
|
||||
written = swrite(sock, STREAMTHIS, count);
|
||||
written = swrite(sock, streamthis, sizeof(streamthis)-1);
|
||||
if(got_exit_signal)
|
||||
return -1;
|
||||
if(written != (ssize_t)count) {
|
||||
if(written != (ssize_t)(sizeof(streamthis)-1)) {
|
||||
logmsg("Stopped streaming");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
case RCMD_IDLE:
|
||||
/* Do nothing. Sit idle. Pretend it rains. */
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -959,19 +959,19 @@ static int sws_send_doc(curl_socket_t sock, struct sws_httprequest *req)
|
|||
default:
|
||||
case RCMD_NORMALREQ:
|
||||
break; /* continue with business as usual */
|
||||
case RCMD_STREAM:
|
||||
#define STREAMTHIS "a string to stream 01234567890\n"
|
||||
count = strlen(STREAMTHIS);
|
||||
case RCMD_STREAM: {
|
||||
static const char streamthis[] = "a string to stream 01234567890\n";
|
||||
for(;;) {
|
||||
written = swrite(sock, STREAMTHIS, count);
|
||||
written = swrite(sock, streamthis, sizeof(streamthis)-1);
|
||||
if(got_exit_signal)
|
||||
return -1;
|
||||
if(written != (ssize_t)count) {
|
||||
if(written != (ssize_t)(sizeof(streamthis)-1)) {
|
||||
logmsg("Stopped streaming");
|
||||
break;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
case RCMD_IDLE:
|
||||
/* Do nothing. Sit idle. Pretend it rains. */
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue