Browse Source

Merge branch 'master' of https://github.com/davidmoreno/FrameworkBenchmarks into PR347

Conflicts:
	php-phpixie/setup.py
	toolset/setup/linux/installer.py
Mike Smith 11 years ago
parent
commit
47dc1ad7fa
3 changed files with 12 additions and 3 deletions
  1. 2 2
      onion/Makefile
  2. 9 0
      onion/hello.c
  3. 1 1
      php-phpixie/setup.py

+ 2 - 2
onion/Makefile

@@ -6,10 +6,10 @@ LDFLAGS=-lonion -ljson -lmysqlclient -lpthread -L/usr/lib64/mysql/ -L.
 hello.o: onion hello.c 
 
 hello: hello.o libonion_static.a base_html.o fortunes_html.o
-	cc hello.o base_html.o fortunes_html.o libonion_static.a -o hello -lpthread -lmysqlclient -ljson -lgnutls -lrt
+	cc hello.o base_html.o fortunes_html.o libonion_static.a -o hello -lpthread `mysql_config --libs` `pkg-config json --libs` -lgnutls -lgcrypt -lrt
 
 clean:
-	rm -f *.o hello base_html.c fortunes_html.c
+	rm -r *.o hello base_html.c fortunes_html.c
 
 	
 libonion_static.a: onion

+ 9 - 0
onion/hello.c

@@ -234,6 +234,12 @@ void free_connection(struct test_data *data, MYSQL *db){
 	}
 }
 
+onion_connection_status return_plaintext(onion_request *req, onion_response *res){
+	onion_response_set_header(res, "Content-Type","text/plain");
+	onion_response_write0(res, "Hello, World!");
+	return OCS_PROCESSED;
+}
+
 /// Multiplexes to the proper handler depending on the path.
 /// As there is no proper database connection pool, take one connection randomly, and uses it.
 onion_connection_status muxer(struct test_data *data, onion_request *req, onion_response *res){
@@ -255,6 +261,9 @@ onion_connection_status muxer(struct test_data *data, onion_request *req, onion_
 		free_connection(data, db);
 		return ret;
 	}
+	if (strcmp(path, "plaintext")==0){
+		return return_plaintext(req, res);
+	}
 	
 	return OCS_INTERNAL_ERROR;
 }

+ 1 - 1
php-phpixie/setup.py

@@ -24,4 +24,4 @@ def stop(logfile, errfile):
     subprocess.call("sudo kill -QUIT $( cat php-phpixie/deploy/php-fpm.pid )", shell=True, stderr=errfile, stdout=logfile)
     return 0
   except subprocess.CalledProcessError:
-    return 1
+    return 1