Code Review
/
ric-plt
/
lib
/
rmr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
The change to fix a bug2
[ric-plt/lib/rmr.git]
/
src
/
rmr
/
nng
/
src
/
mt_call_nng_static.c
diff --git
a/src/rmr/nng/src/mt_call_nng_static.c
b/src/rmr/nng/src/mt_call_nng_static.c
index
325b313
..
71106f1
100644
(file)
--- a/
src/rmr/nng/src/mt_call_nng_static.c
+++ b/
src/rmr/nng/src/mt_call_nng_static.c
@@
-32,16
+32,21
@@
#include <semaphore.h>
static inline void queue_normal( uta_ctx_t* ctx, rmr_mbuf_t* mbuf ) {
#include <semaphore.h>
static inline void queue_normal( uta_ctx_t* ctx, rmr_mbuf_t* mbuf ) {
+ static int warned = 0;
chute_t* chute;
chute_t* chute;
- int state;
if( ! uta_ring_insert( ctx->mring, mbuf ) ) {
rmr_free_msg( mbuf ); // drop if ring is full
if( ! uta_ring_insert( ctx->mring, mbuf ) ) {
rmr_free_msg( mbuf ); // drop if ring is full
+ if( !warned ) {
+ fprintf( stderr, "[WARN] rmr_mt_receive: application is not receiving fast enough; messages dropping\n" );
+ warned++;
+ }
+
+ return;
}
chute = &ctx->chutes[0];
}
chute = &ctx->chutes[0];
- chute->mbuf = mbuf;
- state = sem_post( &chute->barrier ); // tickle the ring monitor
+ sem_post( &chute->barrier ); // tickle the ring monitor
}
/*
}
/*