Bug 34143

Summary: Support for clearing logs
Product: Telepathy Reporter: Nicolas Dufresne <nicolas>
Component: loggerAssignee: Nicolas Dufresne <nicolas>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: pochu27
Version: git master   
Hardware: Other   
OS: All   
Whiteboard: review+ with small fixes
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 27271    

Description Nicolas Dufresne 2011-02-10 09:10:00 UTC
Would be nice to be able to clear a) all logs b) all logs for specific account or c) all logs for specific contact/room in an account
Comment 1 Nicolas Dufresne 2011-02-10 09:14:11 UTC
And the implementation is ready for review, see

http://git.collabora.co.uk/?p=user/nicolas/telepathy-logger.git;a=shortlog;h=refs/heads/clear-logs
Comment 2 Emilio Pozuelo Monfort 2011-02-10 11:48:37 UTC
+_tpl_rmdir_recursively (const gchar *dir_name)

+  dir = g_dir_open (dir_name, 0, &error);

You're not reading error, so just pass NULL instead of passing error and freeing it.

+    <method name="Clear"
+            tp:name-for-bindings="Clear">
+      <tp:docstring>
+        Clear all the log. This will not erase the favourite contacts.

logs

+tpl_dbus_service_clear_entity (TplSvcLogger *logger,

+  entity = g_object_new (TPL_TYPE_ENTITY,
+      "type", type,
+      "identifier", identifier,
+      NULL);

You're leaking entity.

Other than that looks good.
Comment 3 Nicolas Dufresne 2011-02-11 03:56:11 UTC
Fixed and pushed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.