mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
Add no_haveged option
This commit is contained in:
parent
c69ac98154
commit
120edfef7e
@ -232,6 +232,19 @@
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cb_no_haveged">
|
||||
<property name="label" translatable="false">No Haveged</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">9</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cb_psk">
|
||||
|
@ -116,6 +116,9 @@ const char *build_wh_mkconfig_command(ConfigValues* cv){
|
||||
if(cv->hidden!=NULL && (strcmp(cv->hidden,"1") == 0))
|
||||
strcat(cmd_mkconfig," --hidden ");
|
||||
|
||||
if(cv->no_haveged!=NULL && (strcmp(cv->no_haveged,"1") == 0))
|
||||
strcat(cmd_mkconfig," --no-haveged ");
|
||||
|
||||
if(cv->channel!=NULL && (strcmp(cv->channel,"default") != 0) && (cv->freq==NULL||(strcmp(cv->freq,"2.4") == 0)|| (strcmp(cv->freq,"5") == 0))){
|
||||
|
||||
strcat(cmd_mkconfig," -c ");
|
||||
|
@ -104,6 +104,9 @@ static void setConfigValues(const char * key, char *value){
|
||||
if( !strcmp ( HIDDEN, key ))
|
||||
configValues.hidden = value;
|
||||
|
||||
if( !strcmp ( NO_HAVEGED, key ))
|
||||
configValues.no_haveged = value;
|
||||
|
||||
if( !strcmp ( NO_VIRT, key ))
|
||||
configValues.no_virt = value;
|
||||
|
||||
|
@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define NO_DNS "NO_DNS"
|
||||
#define NO_DNSMASQ "NO_DNSMASQ"
|
||||
#define HIDDEN "HIDDEN"
|
||||
#define NO_HAVEGED "NO_HAVEGED"
|
||||
#define MAC_FILTER "MAC_FILTER"
|
||||
#define MAC_FILTER_ACCEP "MAC_FILTER_ACCEPT"
|
||||
#define ISOLATE_CLIENTS "ISOLATE_CLIENTS"
|
||||
@ -90,6 +91,7 @@ typedef struct{
|
||||
char *accepted_macs;
|
||||
char *ieee80211n;
|
||||
char *ieee80211ac;
|
||||
char *no_haveged;
|
||||
} ConfigValues;
|
||||
|
||||
|
||||
|
12
src/ui/ui.c
12
src/ui/ui.c
@ -82,6 +82,7 @@ GtkRadioButton *rb_freq_2;
|
||||
GtkRadioButton *rb_freq_5;
|
||||
|
||||
GtkCheckButton *cb_hidden;
|
||||
GtkCheckButton *cb_no_haveged;
|
||||
GtkCheckButton *cb_psk;
|
||||
GtkCheckButton *cb_mac;
|
||||
GtkCheckButton *cb_novirt;
|
||||
@ -385,6 +386,7 @@ int initUi(int argc, char *argv[]){
|
||||
combo_internet = (GtkComboBox *) gtk_builder_get_object(builder, "combo_internet");
|
||||
|
||||
cb_hidden = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_hidden");
|
||||
cb_no_haveged = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_no_haveged");
|
||||
cb_psk = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_psk");
|
||||
cb_mac = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_mac");
|
||||
cb_novirt = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_novirt");
|
||||
@ -480,6 +482,11 @@ void init_ui_from_config(){
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_hidden,TRUE);
|
||||
}
|
||||
|
||||
if(strcmp(values->no_haveged,"1")==0){
|
||||
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_no_haveged,TRUE);
|
||||
}
|
||||
|
||||
if(strcmp(values->use_psk,"1")==0){
|
||||
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_psk,TRUE);
|
||||
@ -826,6 +833,11 @@ static int init_config_val_input(ConfigValues* cv){
|
||||
else
|
||||
cv->hidden =NULL;
|
||||
|
||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_no_haveged)))
|
||||
cv->no_haveged = "1";
|
||||
|
||||
else
|
||||
cv->no_haveged =NULL;
|
||||
|
||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_novirt)))
|
||||
cv->no_virt = "1";
|
||||
|
Loading…
Reference in New Issue
Block a user