Skip to content

Commit

Permalink
1.3
Browse files Browse the repository at this point in the history
1.3
  • Loading branch information
uplusware committed Jan 9, 2022
1 parent 5d9e4d6 commit 57e5564
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 15 deletions.
1 change: 0 additions & 1 deletion api/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ int DatabaseStorage::Ping()

return (ret_val ? 0 : -1);
#else
//printf("mysql ping\n");
return mysql_ping(m_hMySQL);
#endif /* _MONGODB_ */
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 9 additions & 6 deletions build_release_all.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
VERSION=1.3
OS=centos8
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
cd ${SCRIPT_DIR}/src/

#async arch
NAME=async
cd ${SCRIPT_DIR}/src/
make clean
make
make ASYNC=1
cd ${SCRIPT_DIR}
chmod a+x ${SCRIPT_DIR}/release.sh
${SCRIPT_DIR}/release.sh ${VERSION} threads ${OS}
${SCRIPT_DIR}/release.sh ${VERSION} ${NAME} ${OS}

#thread arch
NAME=thread
cd ${SCRIPT_DIR}/src/
make clean
make ASYNC=1
cd ${SCRIPT_DIR}
chmod a+x ${SCRIPT_DIR}/release.sh
${SCRIPT_DIR}/release.sh ${VERSION} async ${OS}
${SCRIPT_DIR}/release.sh ${VERSION} ${NAME} ${OS}
17 changes: 15 additions & 2 deletions build_release_install.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
#!/bin/bash
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)
VERSION=1.3
OS=centos8
NAME=dev
SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd)

#async arch
NAME=async
cd ${SCRIPT_DIR}/src/
make clean
make ASYNC=1
cd ${SCRIPT_DIR}
chmod a+x ${SCRIPT_DIR}/release.sh
${SCRIPT_DIR}/release.sh ${VERSION} ${NAME} ${OS}

#thread arch
NAME=thread
cd ${SCRIPT_DIR}/src/
make clean
make
cd ${SCRIPT_DIR}
chmod a+x ${SCRIPT_DIR}/release.sh
${SCRIPT_DIR}/release.sh ${VERSION} ${NAME} ${OS}

#pick one and install
chmod a+x ${SCRIPT_DIR}/${OS}-heaphttpd-bin-${NAME}-x86_64-linux/install.sh
sudo ${SCRIPT_DIR}/${OS}-heaphttpd-bin-${NAME}-x86_64-linux/install.sh
sudo /etc/init.d/heaphttpd restart
4 changes: 2 additions & 2 deletions html/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Heaphttpd Web Server/1.1</title>
<title>Heaphttpd Web Server/1.3</title>
<script type="text/javascript">
function WebSocketSample()
{
Expand Down Expand Up @@ -42,7 +42,7 @@
</script>
</head>
<body>
<h1>Heaphttpd Web Server/1.1</h1>
<h1>Heaphttpd Web Server/1.3</h1>
<hr>
<image src="heaphttpd.png" />
<p>Performance Test(depends on api/perf)</p>
Expand Down
1 change: 0 additions & 1 deletion src/util/general.h
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,6 @@ int __inline__ code_convert(const char *from_charset, const char *to_charset, co

int __inline__ code_convert_ex(const char *from_charset, const char *to_charset, const char *inbuf, string& strout)
{
//printf("%s => %s\n", from_charset, to_charset);
if(strcasecmp(from_charset, to_charset) == 0)
{
strout = inbuf;
Expand Down
3 changes: 0 additions & 3 deletions src/util/huffman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ int hf_byte_encode(unsigned char ch, int remain, unsigned char *buff){
int i = 0;
int codes = HEX_TO_HF_CODE(ch);
int nbits = HEX_TO_HF_CODE_LEN(ch);
//printf("'%c'|codes(%d)|len(%d)\n", ch, codes, nbits );
for(;;){
if( remain > nbits){
t = (unsigned char)(codes << (remain-nbits));
Expand Down Expand Up @@ -149,8 +148,6 @@ int hf_string_decode(NODE* h_node, unsigned char *enc, int enc_sz, char *out_buf
printf("invalid huffmand code\n");
return -1; //invalid huffmand code
}
//printf("n->sym : %c , n->size = %d\n", n->sym, n->size);
//if( n->children == NULL){
if( n->size == 0){
if( out_sz > 0 && at > out_sz){
printf("out of length\n");
Expand Down

0 comments on commit 57e5564

Please sign in to comment.