Skip to content

Commit

Permalink
Merge branch 'main' into lev-kv-no-experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
levb authored Feb 16, 2025
2 parents 54948d7 + b04bf34 commit 3e359f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/micro_monitoring.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,9 @@ static microError *
handle_stats_default(microRequest *req)
{
microError *err = NULL;
microService *m = microRequest_GetService(req);
microServiceStats *stats = NULL;
natsBuffer *buf = NULL;

if ((m == NULL) || (m == NULL))
return micro_ErrorInvalidArg; // Should not happen

MICRO_CALL(err, microService_GetStats(&stats, req->Service));
MICRO_CALL(err, marshal_stats(&buf, stats));
MICRO_CALL(err, microRequest_Respond(req, natsBuf_Data(buf), natsBuf_Len(buf)));
Expand Down
10 changes: 6 additions & 4 deletions src/nats.h
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,7 @@ typedef void (*stanConnectionLostHandler)(
* @param config points to a natsClientConfig. A copy of the settings is made,
* so the config can be freed after initializing the NATS client.
*/
natsStatus
NATS_EXTERN natsStatus
nats_OpenWithConfig(natsClientConfig *config);

/** \brief Initializes the library.
Expand Down Expand Up @@ -1964,7 +1964,8 @@ nats_GetVersionNumber(void);
* @see nats_GetVersion
* @see nats_GetVersionNumber
*/
NATS_EXTERN bool nats_CheckCompatibility(void);
NATS_EXTERN bool
nats_CheckCompatibility(void);
#else

#define nats_CheckCompatibility() nats_CheckCompatibilityImpl(NATS_VERSION_REQUIRED_NUMBER, \
Expand Down Expand Up @@ -4216,7 +4217,7 @@ natsConnection_Connect(natsConnection **nc, natsOptions *options);
*
* @param nc the pointer to the #natsConnection object.
*/
natsStatus
NATS_EXTERN natsStatus
natsConnection_Reconnect(natsConnection *nc);

/** \brief Process a read event when using external event loop.
Expand Down Expand Up @@ -8362,7 +8363,8 @@ microService_Run(microService *m);
*
* @see #micro_AddService, #microService_Run
*/
NATS_EXTERN microError *microService_Stop(microService *m);
NATS_EXTERN microError *
microService_Stop(microService *m);

/** @} */ // end of microServiceFunctions

Expand Down
2 changes: 1 addition & 1 deletion src/natsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static inline bool nats_StringEquals(const char *s1, const char *s2)
if (s2 == NULL)
return false;

return strcmp(s1, s2);
return strcmp(s1, s2) == 0;
}

#define DUP_STRING(s, s1, s2) \
Expand Down
3 changes: 1 addition & 2 deletions test/check_cpp/check_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <iostream>
#include <nats.h>

// Check C++ compiler compatibility of structs in
Expand All @@ -24,6 +23,6 @@ int main(int argc, char **argv)
jsFetch fetch;
fetch.opts.Timeout = 1;

std::cout << "OK" << std::endl;
printf("OK\n");
return 0;
}

0 comments on commit 3e359f3

Please sign in to comment.