Skip to content

Commit

Permalink
Merge pull request #63 from pinkra/master
Browse files Browse the repository at this point in the history
Some fix to NethServer spec, json fix
  • Loading branch information
wlanmac committed Jul 1, 2015
2 parents 4f09b30 + 1a1bc23 commit b7384ce
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
== ChangeLog (CoovaChilli-v1.3.1.3) ==
* Fix json encoding for radius reply.

== ChangeLog (CoovaChilli-v1.3.1.2) ==
* Add json support.

== ChangeLog (CoovaChilli-v1.3.1 git2763bb5) ==

* Added NethServer distro spec.in
Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(coova-chilli, 1.3.1-svn, support@coova.com)
AC_INIT(coova-chilli, 1.3.1.3, support@coova.com)
AC_CONFIG_SRCDIR([src/chilli.c])

AM_INIT_AUTOMAKE
Expand Down Expand Up @@ -809,7 +809,6 @@ AC_CONFIG_FILES([Makefile
json/Makefile
distro/Makefile
distro/suse/coova-chilli.spec
distro/nethserver/coova-chilli.spec
distro/redhat/coova-chilli.spec])

AC_OUTPUT
12 changes: 9 additions & 3 deletions distro/nethserver/coova-chilli.spec.in → coova-chilli.spec
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
Summary: Coova-Chilli is a Wireless LAN Access Point Controller
Name: @PACKAGE@
Version: @VERSION@
Name: coova-chilli
Version: 1.3.1.3
Release: 1%{?dist}
URL: http://www.coova.org/
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: System Environment/Daemons
BuildRoot: %{_tmppath}/%{name}-root

%if %{!?_without_ssl:1}0
BuildRequires: openssl-devel libtool gengetopt
Expand Down Expand Up @@ -35,6 +34,7 @@ sh bootstrap
--enable-chilliproxy \
--enable-chilliscript \
--with-poll \
--enable-libjson \
%if %{!?_without_ssl:1}0
--with-openssl \
--enable-chilliradsec \
Expand Down Expand Up @@ -92,6 +92,12 @@ fi
%{_mandir}/man8/*.8*

%changelog
* Fri Jun 26 2015 Giovanni Bezicheri <giovanni.bezicheri@nethesis.it>
* Fix json encoding for radius reply.

* Tue May 13 2015 Giovanni Bezicheri <giovanni.bezicheri@nethesis.it>
* Add support for json uri.

* Fri Nov 14 2014 Giovanni Bezicheri <giovanni.bezicheri@nethesis.it>
- Add HS_LANIF_KEEPADDR option in chilli sysconfig.

Expand Down
2 changes: 1 addition & 1 deletion distro/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1 @@
EXTRA_DIST = redhat/coova-chilli.spec suse/coova-chilli.spec nethserver/coova-chilli.spec
EXTRA_DIST = redhat/coova-chilli.spec suse/coova-chilli.spec
10 changes: 7 additions & 3 deletions src/redir.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#ifdef ENABLE_EWTAPI
#include "ewt.h"
#endif
#include "json/json.h"

static int optionsdebug = 0; /* TODO: Should be changed to instance */

Expand Down Expand Up @@ -1340,9 +1341,12 @@ static int redir_json_reply(struct redir_t *redir, int res, struct redir_conn_t
bconcat(json, tmp);

if (reply) {
bcatcstr(json, ",\"message\":\"");
bcatcstr(json, reply);
bcatcstr(json, "\"");
struct json_object* reply_json_obj;
reply_json_obj = json_object_new_string(reply);

bcatcstr(json, ",\"message\":");
bcatcstr(json, json_object_to_json_string(reply_json_obj));
json_object_put(reply_json_obj);
}

if ((flg & FLG_chlg) && hexchal) {
Expand Down

0 comments on commit b7384ce

Please sign in to comment.