Commit 4e5a9f1b authored by Claes Sjofors's avatar Claes Sjofors

Qcom, bugfix in buffering of subscription messages

parent f1f922bd
...@@ -481,6 +481,27 @@ clean_insert ( ...@@ -481,6 +481,27 @@ clean_insert (
pwr_tBoolean ret_pend = FALSE; pwr_tBoolean ret_pend = FALSE;
pwr_tBoolean first = FALSE; pwr_tBoolean first = FALSE;
#if 0
// Print number of buffers in queue
static int cnt = 0;
int seg_cnt = 0;
if ( cnt >= 50 && esp->head.flags.b.first) {
for (sp = lst_Succ(NULL, le, &se); se != le; sp = lst_Succ(NULL, se, &se))
seg_cnt++;
cnt = 0;
printf( "0x%x %d\n", (unsigned int)le, seg_cnt);
if ( seg_cnt > 10) {
for (sp = lst_Succ(NULL, le, &se); se != le; sp = lst_Succ(NULL, se, &se)) {
if ( sp->bp)
printf( " %d %d 0x%x\n", sp->head.flags.b.first, sp->bp->b.msg_id, (unsigned int)sp->bp);
}
printf( "New %d %d 0x%x\n", esp->head.flags.b.first, esp->bp->b.msg_id, (unsigned int)esp->bp);
}
}
cnt++;
#endif
li = le; li = le;
if (esp->bp != NULL) { if (esp->bp != NULL) {
if (esp->bp->b.msg_id > 0) { if (esp->bp->b.msg_id > 0) {
...@@ -500,7 +521,7 @@ clean_insert ( ...@@ -500,7 +521,7 @@ clean_insert (
eseg_free(sp); eseg_free(sp);
li = se; li = se;
} else { } else {
break; // break;
} }
} else if (first) { } else if (first) {
break; break;
...@@ -1012,6 +1033,20 @@ import_thread () ...@@ -1012,6 +1033,20 @@ import_thread ()
} }
#endif #endif
#if 0
// Test of bad network
static int cnt = 0;
cnt++;
if ( cnt > 1000) {
if ( cnt < 1006)
continue;
else if ( cnt == 1008)
cnt = 1000;
}
// End Test
#endif
sp->size = bytes - sizeof(sp->head); sp->size = bytes - sizeof(sp->head);
sp->ts_recv = time_Clock(NULL, NULL); sp->ts_recv = time_Clock(NULL, NULL);
decode_head(&sp->head, &msg.head); decode_head(&sp->head, &msg.head);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment