Revision: 8030
          http://playerstage.svn.sourceforge.net/playerstage/?rev=8030&view=rev
Author:   thjc
Date:     2009-07-16 04:30:43 +0000 (Thu, 16 Jul 2009)

Log Message:
-----------
make function table not reinit if called twice
doxygenise a couple of playerc comments

Modified Paths:
--------------
    code/player/trunk/client_libs/libplayerc/playerc.h
    code/player/trunk/libplayerinterface/functiontable.c

Modified: code/player/trunk/client_libs/libplayerc/playerc.h
===================================================================
--- code/player/trunk/client_libs/libplayerc/playerc.h  2009-07-16 03:25:18 UTC 
(rev 8029)
+++ code/player/trunk/client_libs/libplayerc/playerc.h  2009-07-16 04:30:43 UTC 
(rev 8030)
@@ -756,11 +756,11 @@
 */
 PLAYERC_EXPORT void *playerc_client_read(playerc_client_t *client);
 
-/* Read and process a packet (nonblocking)
-   returns 0 if no data recieved, 1 if data recieved and -1 on error*/
+/** Read and process a packet (nonblocking)
+   @returns 0 if no data recieved, 1 if data recieved and -1 on error*/
 PLAYERC_EXPORT int playerc_client_read_nonblock(playerc_client_t *client);
-/* Read and process a packet (nonblocking), fills in pointer to proxy that got 
data
-   returns 0 if no data recieved, 1 if data recieved and -1 on error*/
+/** Read and process a packet (nonblocking), fills in pointer to proxy that 
got data
+   @returns 0 if no data recieved, 1 if data recieved and -1 on error*/
 PLAYERC_EXPORT int playerc_client_read_nonblock_withproxy(playerc_client_t 
*client, void ** proxy);
 
 /** @brief Set the timeout for client requests.

Modified: code/player/trunk/libplayerinterface/functiontable.c
===================================================================
--- code/player/trunk/libplayerinterface/functiontable.c        2009-07-16 
03:25:18 UTC (rev 8029)
+++ code/player/trunk/libplayerinterface/functiontable.c        2009-07-16 
04:30:43 UTC (rev 8030)
@@ -126,13 +126,18 @@
   {0,0,0,NULL,NULL,NULL}
 };
 
-static playerxdr_function_t* ftable;
-static int ftable_len;
+static playerxdr_function_t* ftable=NULL;
+static int ftable_len=0;
 
 void
 playerxdr_ftable_init()
 {
   playerxdr_function_t* f;
+
+  // if for some reason this method gets called more than once just ignore the 
call
+  if (ftable)
+    return;
+
   ftable_len = 0;
   for(f = init_ftable; f->packfunc; f++)
     ftable_len++;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to