Fix up offline mode for pcaprun
git-svn-id: file:///home/svn/framework3/trunk@6210 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
705a34dfda
commit
345a816394
|
@ -288,12 +288,13 @@ rbpcap_next(VALUE self)
|
|||
|
||||
while(! (ret = pcap_dispatch(rbp->pd, 1, (pcap_handler) rbpcap_handler, (u_char *)&job))) {
|
||||
if(rbp->type == OFFLINE) break;
|
||||
printf("type = %d and ret = %d\n", rbp->type, ret);
|
||||
rb_thread_schedule();
|
||||
}
|
||||
|
||||
TRAP_END;
|
||||
|
||||
if(rbp->type = OFFLINE && ret <= 0) return Qnil;
|
||||
if(rbp->type == OFFLINE && ret <= 0) return Qnil;
|
||||
|
||||
if(job.hdr.caplen > 0)
|
||||
return rb_str_new(job.pkt, job.hdr.caplen);
|
||||
|
|
Loading…
Reference in New Issue