[vlc-commits] commit: Growl: cosmetics. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Sat Apr 17 11:58:51 CEST 2010


vlc/vlc-1.0 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Mar 28 17:53:20 2010 +0200| [a98ee2998780584eca626bf75a1fddd94dd56cff] | committer: Rémi Duraffort 

Growl: cosmetics.
(cherry picked from commit ed6f4ee4beb8dc649bc561fd450800581f7c0132)

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=a98ee2998780584eca626bf75a1fddd94dd56cff
---

 modules/misc/notify/growl_udp.c |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/modules/misc/notify/growl_udp.c b/modules/misc/notify/growl_udp.c
index 72dfc9c..f66db4c 100644
--- a/modules/misc/notify/growl_udp.c
+++ b/modules/misc/notify/growl_udp.c
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * growl_udp.c : growl UDP notification plugin
  *****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright (C) 2006 - 2010 the VideoLAN team
  * $Id$
  *
  * Authors: Jérôme Decoodt <djc -at- videolan -dot- org>
@@ -88,11 +88,9 @@ vlc_module_end ()
  *****************************************************************************/
 static int Open( vlc_object_t *p_this )
 {
-    intf_thread_t *p_intf = (intf_thread_t *)p_this;
-
-    playlist_t *p_playlist = pl_Hold( p_intf );
-    var_AddCallback( p_playlist, "item-current", ItemChange, p_intf );
-    pl_Release( p_intf );
+    playlist_t *p_playlist = pl_Hold( p_this );
+    var_AddCallback( p_playlist, "item-current", ItemChange, p_this );
+    pl_Release( p_this );
 
     RegisterToGrowl( p_this );
     return VLC_SUCCESS;
@@ -211,11 +209,13 @@ static int RegisterToGrowl( vlc_object_t *p_this )
     }
     psz_encoded[4] = j;
     for( j = 0 ; psz_notifications[j] != NULL ; j++)
+    {
         if(pb_defaults[j] == true)
         {
             psz_encoded[i++] = (uint8_t)j;
             i_defaults++;
         }
+    }
     psz_encoded[5] = i_defaults;
 
     CheckAndSend(p_this, psz_encoded, i);
@@ -260,10 +260,10 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
 {
     int i, i_handle;
     struct md5_s md5;
-    intf_thread_t *p_intf = (intf_thread_t *)p_this;
-    char *psz_password = config_GetPsz( p_intf, "growl-password" );
-    char *psz_server = config_GetPsz( p_intf, "growl-server" );
-    int i_port = config_GetInt( p_intf, "growl-port" );
+    char *psz_password = config_GetPsz( p_this, "growl-password" );
+    char *psz_server = config_GetPsz( p_this, "growl-server" );
+    int i_port = config_GetInt( p_this, "growl-port" );
+
     strcpy( (char*)(p_data+i_offset), psz_password );
     i = i_offset + strlen(psz_password);
 
@@ -290,8 +290,7 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
     }
 
     shutdown( i_handle, SHUT_RD );
-    if( send( i_handle, p_data, i_offset, 0 )
-          == -1 )
+    if( send( i_handle, p_data, i_offset, 0 ) == -1 )
     {
         msg_Warn( p_this, "send error: %m" );
     }



More information about the vlc-commits mailing list