SNMP: use explicit references to support build with old rust compiler

pull/3926/head
Pierre Chifflier 7 years ago
parent 57b233f462
commit 60324740e6

@ -35,8 +35,8 @@ pub extern "C" fn rs_snmp_log_json_response(state: &mut SNMPState, tx: &mut SNMP
if info.err.0 != 0 { if info.err.0 != 0 {
js.set_string("error", &format!("{:?}", info.err)); js.set_string("error", &format!("{:?}", info.err));
} }
match &info.trap_type { match info.trap_type {
Some((trap_type, oid, address)) => { Some((trap_type, ref oid, address)) => {
js.set_string("trap_type", &format!("{:?}", trap_type)); js.set_string("trap_type", &format!("{:?}", trap_type));
js.set_string("trap_oid", &oid.to_string()); js.set_string("trap_oid", &oid.to_string());
match address { match address {

@ -113,7 +113,7 @@ impl SNMPState {
fn add_pdu_info(&mut self, pdu: &SnmpPdu, tx: &mut SNMPTransaction) { fn add_pdu_info(&mut self, pdu: &SnmpPdu, tx: &mut SNMPTransaction) {
let mut pdu_info = SNMPPduInfo::default(); let mut pdu_info = SNMPPduInfo::default();
pdu_info.pdu_type = pdu.pdu_type(); pdu_info.pdu_type = pdu.pdu_type();
match pdu { match *pdu {
SnmpPdu::Generic(ref pdu) => { SnmpPdu::Generic(ref pdu) => {
pdu_info.err = pdu.err; pdu_info.err = pdu.err;
}, },

Loading…
Cancel
Save