remove some debugging

This commit is contained in:
holger krekel
2019-07-16 00:03:49 +02:00
parent e892c5cf4d
commit 360089ac74
3 changed files with 0 additions and 8 deletions

View File

@@ -20,7 +20,6 @@ def py_dc_callback(ctx, evt, data1, data2):
CFFI only allows us to set one global event handler, so this one CFFI only allows us to set one global event handler, so this one
looks up the correct event handler for the given context. looks up the correct event handler for the given context.
""" """
print("py_dc_callback", evt, data1, data2, ctx)
try: try:
callback = _DC_CALLBACK_MAP.get(ctx, lambda *a: 0) callback = _DC_CALLBACK_MAP.get(ctx, lambda *a: 0)
except AttributeError: except AttributeError:
@@ -58,7 +57,6 @@ def py_dc_callback(ctx, evt, data1, data2):
def set_context_callback(dc_context, func): def set_context_callback(dc_context, func):
print("set_context_callback", dc_context, func)
_DC_CALLBACK_MAP[dc_context] = func _DC_CALLBACK_MAP[dc_context] = func

View File

@@ -70,7 +70,6 @@ impl Context {
} }
pub fn call_cb(&self, event: Event, data1: uintptr_t, data2: uintptr_t) -> uintptr_t { pub fn call_cb(&self, event: Event, data1: uintptr_t, data2: uintptr_t) -> uintptr_t {
println!("call_cb: called");
if let Some(cb) = self.cb { if let Some(cb) = self.cb {
unsafe { cb(self, event, data1, data2) } unsafe { cb(self, event, data1, data2) }
} else { } else {
@@ -181,11 +180,7 @@ pub fn dc_context_new(
probe_imap_network: Arc::new(RwLock::new(0)), probe_imap_network: Arc::new(RwLock::new(0)),
perform_inbox_jobs_needed: Arc::new(RwLock::new(0)), perform_inbox_jobs_needed: Arc::new(RwLock::new(0)),
}; };
println!("context created");
info!(context, 0, "context created");
context context
} }
unsafe fn cb_receive_imf( unsafe fn cb_receive_imf(

View File

@@ -95,7 +95,6 @@ macro_rules! info {
info!($ctx, $data1, $msg,) info!($ctx, $data1, $msg,)
}; };
($ctx:expr, $data1:expr, $msg:expr, $($args:expr),* $(,)?) => {{ ($ctx:expr, $data1:expr, $msg:expr, $($args:expr),* $(,)?) => {{
println!("xxx");
let formatted = format!($msg, $($args),*); let formatted = format!($msg, $($args),*);
let formatted_c = $crate::dc_tools::to_cstring(formatted); let formatted_c = $crate::dc_tools::to_cstring(formatted);
$ctx.call_cb($crate::constants::Event::INFO, $data1 as uintptr_t, $ctx.call_cb($crate::constants::Event::INFO, $data1 as uintptr_t,