Fix block of dynamic route table load
[ric-plt/lib/rmr.git] / src / rmr / si / src / sr_si_static.c
index 3919621..798fe26 100644 (file)
@@ -39,13 +39,13 @@ static void dump_n( char *p, char* label, int n ) {
 
 
        if( label ) {
-               fprintf( stderr, ">>>>> %s p=%p %d bytes\n", label, p, n );
+               fprintf( stderr, "[DUMP] %s p=%p %d bytes\n", label, p, n );
        }
 
        rows = (n/16) + ((n % 16) ? 1 : 0);
 
        for( j = 0; j < rows; j++ ) {
-               fprintf( stderr, "%04x: ", j * 16 );
+               fprintf( stderr, "[DUMP] %04x: ", j * 16 );
 
                for( i = 0; t < n && i < 16; i++, t++ ) {
                        fprintf( stderr, "%02x ", (unsigned char) *p );
@@ -789,6 +789,7 @@ static  rmr_mbuf_t* mtosend_msg( void* vctx, rmr_mbuf_t* msg, int max_to ) {
                                } else {
                                        ok_sends++;
                                        msg = clone_m;                                                                          // clone will be the next to send
+                                       msg->state = RMR_OK;
                                }
                        } else {
                                msg = send_msg( ctx, msg, nn_sock, max_to );                    // send the last, and allocate a new buffer; drops the clone if it was