Minor tweaks for formatting
git-svn-id: file:///home/svn/framework3/trunk@7343 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
58ac7efcfa
commit
ea54f3e013
|
@ -200,9 +200,9 @@ rbpcap_open_live(VALUE self, VALUE iface,VALUE snaplen,VALUE promisc, VALUE time
|
|||
strncpy(rbp->iface, RSTRING_PTR(iface), sizeof(rbp->iface) - 1);
|
||||
|
||||
|
||||
if(rbp->pd) {
|
||||
pcap_close(rbp->pd);
|
||||
}
|
||||
if(rbp->pd) {
|
||||
pcap_close(rbp->pd);
|
||||
}
|
||||
|
||||
rbp->pd = pcap_open_live(
|
||||
RSTRING_PTR(iface),
|
||||
|
@ -391,7 +391,7 @@ rbpcap_next(VALUE self)
|
|||
if(rbp->type == OFFLINE && ret <= 0) return Qnil;
|
||||
|
||||
if(ret > 0 && job.hdr.caplen > 0)
|
||||
return rb_str_new((char *) job.pkt, job.hdr.caplen);
|
||||
return rb_str_new((char *) job.pkt, job.hdr.caplen);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue