Menu

Commit [r265]  Maximize  Restore  History

Release-2.0.6 branch

jost2345 2005-05-16

changed /trunk/php-java-bridge/ChangeLog
changed /trunk/php-java-bridge/VERSION
changed /trunk/php-java-bridge/multicast.c
changed /trunk/php-java-bridge/php-java-bridge.te
changed /trunk/php-java-bridge/test.php
changed /trunk/php-java-bridge/tests.php4/cache.php
changed /trunk/php-java-bridge/tests.php4/testClass.php
changed /trunk/php-java-bridge/tests.php4/utf8-2.php
/trunk/php-java-bridge/ChangeLog Diff Switch to side-by-side view
--- a/trunk/php-java-bridge/ChangeLog
+++ b/trunk/php-java-bridge/ChangeLog
@@ -1,3 +1,23 @@
+2005-05-16  Boekemeier  <jostb@intern>
+
+	* multicast.c (init): return error code if semaphores are not
+	available.
+	(php_java_multicast_backends_available): check error code.
+	
+	* php-java-bridge.te: Temporarily allow semaphores, until the new
+	load balancer code is in place.
+	
+	* VERSION, php-java-bridge.spec: updated version to 2.0.6
+	
+	* README: dl() works again since 5.0.4.
+	
+	* test.php: dito
+
+	* tests.php4/cache.php, tests.php4/utf8-2.php: added dl().
+
+	* php-java-bridge 2.0.6 released
+	
+	
 2005-05-15  Boekemeier  <jostb@intern>
 
 	* INSTALL.WINDOWS: updated.
/trunk/php-java-bridge/VERSION Diff Switch to side-by-side view
--- a/trunk/php-java-bridge/VERSION
+++ b/trunk/php-java-bridge/VERSION
@@ -1 +1 @@
-2.0.6-pre3
+2.0.6
/trunk/php-java-bridge/multicast.c Diff Switch to side-by-side view
--- a/trunk/php-java-bridge/multicast.c
+++ b/trunk/php-java-bridge/multicast.c
@@ -35,11 +35,12 @@
   union php_java_semun val;
   struct semid_ds buf;
   int id = semget(0x9168, 1, IPC_CREAT | 0640);
+  if(id==-1) return -1;
   val.buf = &buf;
-  semctl(id, 0, IPC_STAT, val);
+  if(-1==semctl(id, 0, IPC_STAT, val)) return -1;
   if(!buf.sem_otime) {
     val.val=1;
-    semctl(id, 0, SETVAL, val);
+    if(-1==semctl(id, 0, SETVAL, val)) return -1;
   }
   return id;
 }
@@ -113,15 +114,17 @@
   sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
   if(sock!=-1) {
 	int id, err;
-	enter(id=init()); 
-   {/* FIXME: Should protect this from signals.  If someone manages to
-	   stop the client in this section, one has to remove the
+	id=init(); 
+	if(id != -1) {
+      unsigned char c[1] = {'P'}; /* will be rejected as a broken packet */
+	  enter(id);
+      /* FIXME: Should protect this from signals.  If someone manages
+	   to stop the client in this section, one has to remove the
 	   semaphore manually (see commands ipcs -S and ipcrm -S). But
 	   since the load balancing code will be rewritten in java anyway
 	   (this file, large parts of bind.c and three functions in client
 	   will go away) I just keep this hack until the new code is in
 	   place */
-	  unsigned char c[1] = {'P'}; /* will be rejected as a broken packet */
 	  has_backend = 1;
 	  setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &s_false, sizeof s_false);
 	  err=bind(sock, (struct sockaddr*)&saddr, sizeof saddr);
@@ -135,8 +138,8 @@
 		}
 	  }
 	  close(sock);
+	  leave(id);
 	} 
-    leave(id);
   }
 #endif
   return has_backend;
/trunk/php-java-bridge/php-java-bridge.te Diff Switch to side-by-side view
--- a/trunk/php-java-bridge/php-java-bridge.te
+++ b/trunk/php-java-bridge/php-java-bridge.te
@@ -14,6 +14,10 @@
 allow httpd_t javabridge_t:unix_stream_socket { connectto };
 #allow user_t javabridge_t:unix_stream_socket { connectto };
 allow unconfined_t javabridge_t:unix_stream_socket { connectto };
+
+# FIXME: temp solution until the new load balancing code is in place
+dontaudit httpd_t unconfined_t:sem { associate getattr unix_read unix_write };
+
 
 # starting the bridge
 allow javabridge_t bin_t:dir { search };
/trunk/php-java-bridge/test.php Diff Switch to side-by-side view
Loading...
/trunk/php-java-bridge/tests.php4/cache.php Diff Switch to side-by-side view
Loading...
/trunk/php-java-bridge/tests.php4/testClass.php Diff Switch to side-by-side view
Loading...
/trunk/php-java-bridge/tests.php4/utf8-2.php Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.