also use gp_log_remove_func, to test

https://github.com/gphoto/libgphoto2/pull/171
This commit is contained in:
Marcus Meissner
2017-06-03 11:34:23 +02:00
parent 03e85f9b8b
commit 033b9cf60e

View File

@@ -148,6 +148,7 @@ main ()
const char *name;
char *foldername;
GPContext *context;
int logid;
#ifdef HAVE_MCHECK_H
mtrace();
@@ -155,7 +156,7 @@ main ()
CHECK (gp_list_new(&list));
gp_log_add_func (GP_LOG_DEBUG, log_func, NULL);
logid = gp_log_add_func (GP_LOG_DEBUG, log_func, NULL);
context = gp_context_new ();
gp_context_set_error_func (context, error_func, NULL);
@@ -291,6 +292,7 @@ main ()
#ifdef HAVE_MCHECK_H
muntrace();
#endif
gp_log_remove_func (logid);
return (0);
}